Re: Script that pulls several pages from list?
| From: | CPT John W. Holmes | Date: | Wed, 24 Sep 2003 13:17:33 +0000 |
| Subject: | Re: Script that pulls several pages from list? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163731@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "MIKE YRABEDRA" <php@323ent.com>
> I want to create a php script that will...
>
> 1. Take a list of URLs separated by commas
> 2. Covert that to an array
> 3. Then go through and pull the content from each page in a loop
>
> I am doing this so I can set up a cron job to automatically cache pages
with
> jpcache.
$list = "http://url1,http://url2,http://url3";
$ar = explode(',',$list);
foreach($ar as $url)
{
ob_start();
include($url);
$page = ob_get_contents();
//do something with $page here
ob_end_clean();
}
---John Holmes...