On 5/5/09 9:52 AM, "Wolf" <lonew...@nc.rr.com> wrote:

---- "Miller wrote:
> On 5/5/09 9:23 AM, "Wolf" <lonew...@nc.rr.com> wrote:
> ---- "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
> Hi this is what I'm working with as of now but still getting the blank page 
> of death...clues please:
<!-- SNIP CODE -->

To find your reasons for blank pages:
1) check the php_error log if you have set it up
2) run the file via the command-line (php $filename) and see what happens, what 
errors you are getting back...
3) add the following to the top of your script after the <?php
ini_set('display_errors', 1);

then when you run it, it should barf out the errors, if not, you need to look 
at either your php error log, or the web server error logs

You seemed to have accurately opened and closed your brackets.


Ah..got my errors:

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be 
activated when in safe_mode or an open_basedir is set in 
on line 36

Warning: file_get_contents($target_url) [function.file-get-contents]: failed to 
open stream: No such file or directory in 
/var/www/vhosts/getpublished.news-leader.com/httpdocs/Warrants/inc/dom.php on 
line 39

Now how to correct them, it has to be with using the array because it all works 
perfectly if I am only trying one url, but the array is working because the 
same error spit out the same amount of url's in the array...does that make 

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

Reply via email to