Re: Can this be done?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---- "Miller wrote: 
> Ok I have a script that grabs data from a page and puts it in a db, I need
> to run this script 26 times on 26 different pages on the same site, is there
> a way to do this without making 26 different scripts load? Should I post the
> script?
> 
> Thanks, 
> T.Miller
> 

Sure it can be done...

Change your script so that it has the following:
1. array with the page names/urls in it
2. foreach loop right after the array to parse it
3. in the current place of the file name, but the variable
4. Make sure to close the foreach loop

IE:
<?php

$pages=array("page1.php","page2.php",....,"page26.php");
foreach ($pages as $page)
{
// do all the grabbing and db throwing
}

?>

HTH,
Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux