vBulletin Modifications

php inside php

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-02-2006, 12:04 PM   #1
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default php inside php

Is there anyway to run a php file inside a php file. Eg: your on index.php but you want to run another php file in the background when you click on a certain link but it does not open up a new window?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-02-2006, 12:07 PM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Kind of like when you run a cronjob it runs another file inside the same window.

Also would it be possible to via ajax refresh a bit of the page. Just an option main thing is the one above^

Last edited by Nick R; 07-02-2006 at 12:23 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-02-2006, 12:14 PM   #3
Coder
bairy's Avatar
Join Date: Jun 2006
Real Name: Chris
Location: Birmingham, UK
bairy is on a distinguished road

Default

cron.php runs because it's included as an img, as in <img src="cron.php" width="1" height="1">. This causes your browser to request the file and thus the server executes it.

Within cron.php is this line:
header('Location: ' . $vbulletin->options['cleargifurl']);
which basically means the <img> data is the clear image, and the height and width of 1 pixels means a 1x1 blank image is shown in the browser.


(Incidentally, this is how the "intelligent" image producers work - those ones that tell you your ip/host & browser - it's run as a php and the image is returned as data)

Last edited by bairy; 07-02-2006 at 12:16 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-02-2006, 01:51 PM   #4
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

ok, let me rephrase that, when you click a button would it be possible to run a bunch of code eg:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-02-2006, 02:05 PM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Actually, i realise i can do it all by ajax




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-05-2006, 10:32 AM   #6
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

If you want a PHP file to be run inside another PHP file you can use the include() function.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-05-2006, 10:45 AM   #7
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Is there a way to run it upon mouse click?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-05-2006, 11:07 AM   #8
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

With AJAX it should be possible I suppose.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-05-2006, 02:08 PM   #9
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

tell me, tell me :p




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-06-2006, 09:49 AM   #10
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Quote:
Originally Posted by rogersnm
tell me, tell me :p
I don't know, hardly ever use AJAX :p




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken PHP with SUSE Update Ken Iovino Announcements 2 06-17-2006 12:14 AM
php tcl eggdrop question DeadGaze General vBulletin Support 7 03-24-2006 11:32 AM
how can i get the user id and username just with PHP? AnoxiA General vBulletin Support 12 02-04-2006 04:21 PM
[HELP] Opening a external .php inside the theme ruizit0 vBulletin Modification Requests 1 10-07-2005 03:22 AM
PHP Vulnerabilities in <= 4.3.9 and <= 5.0.2 Junior Announcements 0 05-11-2005 06:19 AM


All times are GMT -3. The time now is 04:21 PM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)