View Single Post
Old 06-26-2006, 03:48 PM  
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
PHP code help needed.

Hi i'm stuck on where to add my Do While Loop statement ... below is the section of the coding that is being processed. what is happening is the source is examined and the version codes are grabbed. but, it needs to loop through the source and grab all version codes and not just the first one.

thanks in advance

Code:
                $resp = curl_exec($ch); 
                //echo "$resp\n"; 
                curl_close($ch);       
                $startkey = "<024version>"; 
                $stopkey = "</024version>";         
                $startpos = strpos($resp, $startkey);  
                if ($startpos !hahahaha false) {  
                    $startpos += strlen($startkey);  
                    $endpos = strpos($resp, $stopkey, $startpos); 
                    $len = ($endpos - $startpos);  
                    $writecontent .= substr($resp, $startpos, $len)."\n";  
                    echo "$writecontent\n"; 
     
                } 
$fp = fopen($outputfile,"w"); 
fwrite($fp,$writecontent); 
fclose($fp);
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote