CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Post deleted by berm

 



berm
Novice

Jul 26, 2007, 6:24 PM

Post #1 of 7 (1051 views)
Post deleted by berm

 


KevinR
Veteran


Jul 26, 2007, 6:47 PM

Post #2 of 7 (1049 views)
Re: [berm] MyParser Problem [In reply to] Can't Post

add a useragent:

$ua->agent('Mozilla/5.0');

and retry. Most likely yahoo does not really want you banging their servers with a bot/script. If there is no useragent defined they might just be denying the request since it most likely is a bot. Make sure you read any terms of service they might have about hitting the yahoo weather servers with a bot.
-------------------------------------------------


berm
Novice

Jul 26, 2007, 6:49 PM

Post #3 of 7 (1048 views)
Re: [KevinR] MyParser Problem [In reply to] Can't Post

Hi, there is no problem in that regard, the data is retuned in the $Content variable.


KevinR
Veteran


Jul 26, 2007, 6:54 PM

Post #4 of 7 (1046 views)
Re: [berm] MyParser Problem [In reply to] Can't Post

the script you posted works for me, with or without defining a useragent.

I get:

<html>
<head>
<title>Yahoo! Weather - Auckland, NZ</title>
</head>
<body>
Yahoo! Weather - Auckland, NZ
</body>
</html>

when I run your script from my localhost using the query string you posted:

http://localhost/cgi-bin/yahoo.pl?NZXX0003
-------------------------------------------------


(This post was edited by KevinR on Jul 26, 2007, 6:54 PM)


berm
Novice

Jul 26, 2007, 6:56 PM

Post #5 of 7 (1043 views)
Re: [KevinR] MyParser Problem [In reply to] Can't Post

GOOD! Yes it does work, can you put it on a server so that I can show my host and finally get them to believe what I have been telling them for 3 days PLEASE!
Thanks!


KevinR
Veteran


Jul 26, 2007, 8:56 PM

Post #6 of 7 (1036 views)
Re: [berm] MyParser Problem [In reply to] Can't Post

http://www.e-pixs.com/cgi-bin/yahoo.pl?NZXX0003

I will keep it up for a few days only. It's the exact script you have posted above, which I named yahoo.pl
-------------------------------------------------


(This post was edited by KevinR on Jul 26, 2007, 8:57 PM)


berm
Novice

Jul 26, 2007, 8:58 PM

Post #7 of 7 (1034 views)
Re: [KevinR] MyParser Problem [In reply to] Can't Post

Thankyou!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives