Hello
I'm having some problems getting my output writting to a file using FILE commands.
I would really appreciate any help with the code below. Thanks!
<?php
set_time_limit(0);
$fd = fopen ("/inetpub/wwwroot/getfiles/test.txt","r") ; //open the file to read
$q = file("/inetpub/wwwroot/getfiles/test.txt"); //get the query string
$a = 0;
// a= counter
while ($a < count($q)) //loop to read each name
{$qurl = chop($q[$a]);
$info = file("http://www.networksolutions.com/cgi-bin/whois/whois?STRING=$qurl");
//$info = file("http://www.opensrs.net/cgi-bin/whois.cgi?action=lookup&domain=lfo.com"); //array of altavista output file
for ($b = 40; $b <= 125; $b++) {
echo " $info[$b]";
$fp = fopen("/inetpub/wwwroot/getfiles/domainlit.txt", "a"); //open file to write
//echo $fp;
fwrite($fp, $info[$b]); //write $input to file
fclose($fp);
}
$a++;
echo($q[$a]);
}
?>