poe Posted November 26, 2006 Share Posted November 26, 2006 i have about 5-6 scripts that update my database once i get a pagehit at my website.ie. updateGoalies.php, then it redirects to updateForwards.php, then redirects itself to updateTeams.php etc... how do i run these scripts in the 'background' as someone is viewing my site?i dont need them to have to watch all these update pages go through their cycle. Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/ Share on other sites More sharing options...
JasonLewis Posted November 26, 2006 Share Posted November 26, 2006 you can include them or require, either one would work... Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130288 Share on other sites More sharing options...
poe Posted November 26, 2006 Author Share Posted November 26, 2006 what if i have just 1 file, then pass the paramaters after the '?'ie.include('update.php?updatewhat=goalies&stats=fullseason');include('update.php?updatewhat=forwards&stats=fullseason');include('update.php?updatewhat=teams&stats=fullseason');this doesnt work Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130303 Share on other sites More sharing options...
Philip Posted November 26, 2006 Share Posted November 26, 2006 You have to do:[code]<?php$updatewhat = "whateverpage";$stats = "fullseason";include('update.php');?>[/code]It is not possible to include files with the ?var=var - as PHP will look for the file update.php?updatewhat=what&stats=fullseason in the directory ;) Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130310 Share on other sites More sharing options...
poe Posted November 26, 2006 Author Share Posted November 26, 2006 cool - thanksis there a way to get the page to load the page content while it runs the included scripts.it seems to run the scripts before loading any page content Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130345 Share on other sites More sharing options...
JasonLewis Posted November 26, 2006 Share Posted November 26, 2006 that may be something to do with your included scripts, something to do with the code i mean. otherwise...hmmm... Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130346 Share on other sites More sharing options...
poe Posted November 26, 2006 Author Share Posted November 26, 2006 is there a way to call a php script to run via an image Quote Link to comment https://forums.phpfreaks.com/topic/28475-rum-php-script-in-the-background/#findComment-130349 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.