Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Re: Very Frustrating



Tip: Looking for answers? Try searching our database.



You are accessing this site in a read-only mode. For full access to all member benefits, including message posting, please login or register. Registration is completely free, simple, and takes only a few seconds.

Login | Free WebmasterKB.com registration | Whole discussion thread

The message you are replying to and its parents are listed in the reverse order with the most recent posts first. This might not be the whole discussion thread. To read all the messages in this thread please click here.

Re: Very Frustrating

schnibitz30 Jul 2009 02:53
> > #use strict;
>
[quoted text clipped - 4 lines]
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

Thank you, I've tried both ways BTW, and it doesn't give me any more
helpful messages.  I checked DNS on my server.  I can ping the
address, and it resolves to an IP just fine.  I've checked the perl
resolver by issuing a special perl command, and it too resolves just
fine.  I can wget the site without issue, my /etc/hosts file has two
measly entries, so I don't think that a corrupt hosts file has
anything to do with it.  Why would it work command-line, but not when
invoked through the browser?

Tad J McClellan30 Jul 2009 01:48
> #use strict;

You lose all of the benfits of that pragma when you comment
it out like that.

Signature

Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


schnibitz30 Jul 2009 00:23
Hi everyone, the following code works from my linux shell as root or
the 'nobody' accounts:
-----------------------------

#!/usr/bin/perl
#use strict;
#use LWP::Simple;
use LWP::UserAgent;
#use URI::URL;

print "Content-type: text/html\n\n";
print <<HTML;
<html>
<head>
<title>TEST</title>
</head>
<body>
HTML

my $url_variable = $input{'URL'};

my $ua = new LWP::UserAgent;
$ua->timeout(120);
my $request = new HTTP::Request('GET', 'http://www.yahoo.com');
my $response = $ua->request($request);
my $content = $response->content();
print "$content";
print <<HTML;
</body>
</html>
</head>
HTML
---------------------------------

BUT when I hit that same .pl file with my browser I get the following
error:

500 Can't connect to www.yahoo.com:80 (Bad hostname 'www.yahoo.com')

Can someone help me please? I'm doing something idiotic, I know, and
anything you could do to help would be appreciated.

-G

Quick links:

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage




©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.