I have a weird problem. I am trying to call a page via a CGI script (to submit to search engine spiders). The weird thing is the code I have works fine until I set the $host variable to a dead link. An example of it being set to a dead URL s below;
my $BLANK = $EOL x 2;
my $host = "www.googfgle.com";
my $document = "/addurl?type=submit&q=$url&dq=";
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $host,
PeerPort => "http(80)",
);
unless ($remote) { &error_submit("Google"); }
$remote->autoflush(1);
print $remote "GET $document HTTP/1.0" . $BLANK;
$good_engine .= qq~ <li>Google</li> ~;Does anyone have any ideas?
The error log says;
Prototype mismatch: sub main::head vs ($) at /home/ace-webm/public_html/cgi-bin/submitnew.cgi line 19
Prototype mismatch: sub main::head vs ($) at /home/ace-webm/public_html/cgi-bin/submitnew.cgi line 19Any help you guys can offer will be greatly appreciated.
Andy
webmaster@ace-installer.com
http://www.ace-installer.com
Code:
my $EOL = "\015\012"; my $BLANK = $EOL x 2;
my $host = "www.googfgle.com";
my $document = "/addurl?type=submit&q=$url&dq=";
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $host,
PeerPort => "http(80)",
);
unless ($remote) { &error_submit("Google"); }
$remote->autoflush(1);
print $remote "GET $document HTTP/1.0" . $BLANK;
$good_engine .= qq~ <li>Google</li> ~;
The error log says;
Code:
[Sat Jul 21 07:00:40 2001] submitnew.cgi: Can't call method "autoflush" on an undefined value at /home/ace-webm/public_html/cgi-bin/submitnew.cgi line 94. Prototype mismatch: sub main::head vs ($) at /home/ace-webm/public_html/cgi-bin/submitnew.cgi line 19
Prototype mismatch: sub main::head vs ($) at /home/ace-webm/public_html/cgi-bin/submitnew.cgi line 19
Andy
webmaster@ace-installer.com
http://www.ace-installer.com