...

View Full Version : Link/html verification spider - cgi/perl



snoop
09-14-2002, 07:42 AM
anyone know where i can get this particular spider:
type url into a box, click submit and if that page (typed in) contains the correct html insert/link (pre defined in script) then it goes to a certain page and if not, goes to another page.

free would be preferable, thanks in advance.

SNOOP

technophobia
09-14-2002, 04:14 PM
#html file

<html.............>
<form action=somecgifile.cgi method=post>
<input type=text name=teststring><br>
<input type=submit value=submit>
<input type=reset value=clear>
</form>
<............/html>





#the cgi file
#!perls home (loctation on server Hard drive)
use CGI qw(:standard);
#
my ($teststring,$buffer,$name,$value,$pathone,$pathtwo);
#
$pathone="htpp:somesite.com";
$pathtwo="http:anothersite.com";
#
read(STDIN,$buffer,$ENV{CONTENT_LENGTH});
chomp $buffer; # i think will take away the ending '&'
($name,$value)=split(/=/,$buffer);
$teststring=$value;
#
if($teststring eq ('http:ihopethiscodeworks.com') || ('http:www.ihopethiscodeworks.com')){
print "Location: $pathone";}
#
else {print "Location: $pathtwo";}

snoop
09-15-2002, 01:44 AM
thanks

snoop
09-15-2002, 09:32 AM
i had a problem with that script, reffering to line 6 any help?

technophobia
09-16-2002, 07:33 PM
take out the
chomp $buffer; # i think will take away the ending '&'

and paste this over its old version

if($teststring eq (('http:ihopethiscodeworks.com') || ('http:www.ihopethiscodeworks.com')))
{print "Location: $pathone";
}else {print "Location: $pathtwo";}



i wrote it out quick from my head and i didnt test it. I didnt test this ether.

good luck

snoop
09-17-2002, 08:17 AM
an error still appears '500 internal server error'
any ideas

thanks

snoop
09-21-2002, 07:17 AM
i



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum