Yesterday I log in to a friend’s GNU/Linux server and I wanted to test internet access.
I tried to do a search in google using wget as lynx was not installed. But I got a funny error.
melios@hostname:tmp$ wget http://www.google.com/search?q=world
–2010-10-22 22:04:22– http://www.google.com/search?q=world
Resolving http://www.google.com… 173.194.36.104
Connecting to http://www.google.com|173.194.36.104|:80… connected.
HTTP request sent, awaiting response… 403 Forbidden
2010-10-22 22:04:24 ERROR 403: Forbidden.
Google did not respond to my client (wget), because it was not a browser!!!
So, I rerun wget with ‘-U’ parameter, which means “user agent”, to emulate Firefox and avoid this flaw.
melios@hostname:tmp$ wget -U firefox http://www.google.com/search?q=world
–2010-10-22 22:10:39– http://www.google.com/search?q=world
Resolving http://www.google.com… 173.194.36.104
Connecting to http://www.google.com|173.194.36.104|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [text/html]
Saving to: `search?q=world’
[ <=> ] 40,080 109K/s in 0.4s
2010-10-22 22:10:40 (109 KB/s) – `search?q=world’ saved [40080]
Funny error with simple solution 🙂
Regards,
Adrianos.
—
Democracy requires Free Software.