Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-14-2002, 07:42 AM   PM User | #1
snoop
New Coder

 
Join Date: Sep 2002
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
snoop is an unknown quantity at this point
Link/html verification spider - cgi/perl

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
__________________
http://www.linksking.com - increase links to your site
http://www.mr-freebie.com - thousands of freebies!
snoop is offline   Reply With Quote
Old 09-14-2002, 04:14 PM   PM User | #2
technophobia
New to the CF scene

 
Join Date: Aug 2002
Location: PA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
technophobia is an unknown quantity at this point
#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>



Code:
#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";}
__________________
-TECHNOPHOBIA-
technophobia is offline   Reply With Quote
Old 09-15-2002, 01:44 AM   PM User | #3
snoop
New Coder

 
Join Date: Sep 2002
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
snoop is an unknown quantity at this point
thanks
__________________
http://www.linksking.com - increase links to your site
http://www.mr-freebie.com - thousands of freebies!
snoop is offline   Reply With Quote
Old 09-15-2002, 09:32 AM   PM User | #4
snoop
New Coder

 
Join Date: Sep 2002
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
snoop is an unknown quantity at this point
problem

i had a problem with that script, reffering to line 6 any help?
__________________
http://www.linksking.com - increase links to your site
http://www.mr-freebie.com - thousands of freebies!
snoop is offline   Reply With Quote
Old 09-16-2002, 07:33 PM   PM User | #5
technophobia
New to the CF scene

 
Join Date: Aug 2002
Location: PA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
technophobia is an unknown quantity at this point
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
__________________
-TECHNOPHOBIA-
technophobia is offline   Reply With Quote
Old 09-17-2002, 08:17 AM   PM User | #6
snoop
New Coder

 
Join Date: Sep 2002
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
snoop is an unknown quantity at this point
still problem

an error still appears '500 internal server error'
any ideas

thanks
__________________
http://www.linksking.com - increase links to your site
http://www.mr-freebie.com - thousands of freebies!
snoop is offline   Reply With Quote
Old 09-21-2002, 07:17 AM   PM User | #7
snoop
New Coder

 
Join Date: Sep 2002
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
snoop is an unknown quantity at this point
i

i
__________________
http://www.linksking.com - increase links to your site
http://www.mr-freebie.com - thousands of freebies!
snoop is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:46 AM.


Advertisement
Log in to turn off these ads.