fireburner69
Programmer
Ok I have a db full with html links!
First I create a query and but all the links into array
$links[$i] and everytime $i++;
SO I have the array with all the links
And then I make a loop in order to fopen all the links which is something like that
//Start collecting proccess
$w=0;
while ($i > $w) {
$OpenFile = fopen "$links[$w]", "r"
;
$RetrieveFile = fread($OpenFile, 200000);
$GrabData = eregi("<title>(.*)</title>", $RetrieveFile, $DataPrint);
fclose($OpenFile);
echo $DataPrint[$w]."<br>";
$w++;
}
Everything goes fine until this msgs comes up
Warning: fopen(" ", "r"
- Success in cmeta.php on line 16
Warning: Supplied argument is not a valid File-Handle resource in cmeta.php on line 17
Warning: Supplied argument is not a valid File-Handle resource in cmeta.php on line 20
After that I said ok lets see that. I replace the $links[$w] with the url and the space after that if you notice that and It works fine!
Any ideas why it does that? and How can I over pass it?
I just need to collect from 12000 Sites the <title> So this is imposible to do it manual
) any ideas?
Thanx in advance!
First I create a query and but all the links into array
$links[$i] and everytime $i++;
SO I have the array with all the links
And then I make a loop in order to fopen all the links which is something like that
//Start collecting proccess
$w=0;
while ($i > $w) {
$OpenFile = fopen "$links[$w]", "r"

$RetrieveFile = fread($OpenFile, 200000);
$GrabData = eregi("<title>(.*)</title>", $RetrieveFile, $DataPrint);
fclose($OpenFile);
echo $DataPrint[$w]."<br>";
$w++;
}
Everything goes fine until this msgs comes up
Warning: fopen(" ", "r"

Warning: Supplied argument is not a valid File-Handle resource in cmeta.php on line 17
Warning: Supplied argument is not a valid File-Handle resource in cmeta.php on line 20
After that I said ok lets see that. I replace the $links[$w] with the url and the space after that if you notice that and It works fine!
Any ideas why it does that? and How can I over pass it?
I just need to collect from 12000 Sites the <title> So this is imposible to do it manual

Thanx in advance!
