Search found 4 matches

by joe592
Thu Apr 15, 2010 4:34 pm
Forum: PHP - Code
Topic: Script Looping Problem
Replies: 5
Views: 109

Re: Script Looping Problem

After further reviewing my code, I thought that the problem must lie elsewhere. I decided to check the config file for apache and php and discovered the problem. The problem was in the php config file. There is a line in there that specifies the maximum allowable time in seconds for a script to exec...
by joe592
Thu Apr 15, 2010 4:14 pm
Forum: PHP - Code
Topic: Script Looping Problem
Replies: 5
Views: 109

Re: Script Looping Problem

What I mean by that is that the directory contains 25 html files, but the loop stops at the 9th file in the directory. When I was developing this script I wrote it in 2 parts. 1. To open the parent directory, check the extension and return only the html files. 2. To load a html file and return all i...
by joe592
Thu Apr 15, 2010 1:11 am
Forum: PHP - Code
Topic: Script Looping Problem
Replies: 5
Views: 109

Re: Script Looping Problem

Here is the code I'm trying to use. $htmlDoc = new DomDocument(); $handle = opendir('.'); while (false !== ($file = readdir($handle))) { $extension = strtolower(substr(strchr($file, '.'), 1)); if($extension == 'html'){ echo $file . '<br>'; $htmlDoc->loadHTMLFile($file); $element = $htmlDoc->getEleme...
by joe592
Wed Apr 14, 2010 8:13 pm
Forum: PHP - Code
Topic: Script Looping Problem
Replies: 5
Views: 109

Script Looping Problem

I am trying to get a script to loop through all files in a directory, load each html file, loop through all img tags in the document and get check a server response header. The script wont loop through all the files properly. It appears to loop through the img elements correctly and checks the respo...