cortic
03-31-2003, 06:52 AM
I'm writing a web ring script, one function I would like it to have is the ability to spider all the members and check they all have links up (so its not sending traffic to sites that's not sending traffic back lol), I started with :
for ($i = 0; $i <= $thing{'count'}; $i++) {
$tempi = 'tst_'.$i.'_1';
$tempii= 'tst_'.$i.'_2';
open (NAMES, $thing{$tempii});
@fileinput = <NAMES>;
close (NAMES);
print"<br>$thing{$tempi} is $#fileinput<br>";
}
ok, first an explanation, $thing{'count'} holds the number of members tempi and tempii just hold a string that - when used with $thing calls up username and url of there site (member 1's username would be $thing{'tst_0_1'} and there site url would be $thing{'tst_0_2'}). The above code was just to test whether I could open there pages like this, and I couldn't.
the 'open (NAMES, $thing{$tempii});' seems to only take local files, whenever I put in a full url $#fileinput returns -1.
As you have probably figured by now I'm still learning perl lol, basically what I need is a way to read in html from full urls, any help would be welcome.
thanks
for ($i = 0; $i <= $thing{'count'}; $i++) {
$tempi = 'tst_'.$i.'_1';
$tempii= 'tst_'.$i.'_2';
open (NAMES, $thing{$tempii});
@fileinput = <NAMES>;
close (NAMES);
print"<br>$thing{$tempi} is $#fileinput<br>";
}
ok, first an explanation, $thing{'count'} holds the number of members tempi and tempii just hold a string that - when used with $thing calls up username and url of there site (member 1's username would be $thing{'tst_0_1'} and there site url would be $thing{'tst_0_2'}). The above code was just to test whether I could open there pages like this, and I couldn't.
the 'open (NAMES, $thing{$tempii});' seems to only take local files, whenever I put in a full url $#fileinput returns -1.
As you have probably figured by now I'm still learning perl lol, basically what I need is a way to read in html from full urls, any help would be welcome.
thanks