My picIn the previous posts about the HTTP protocol, “HTTP for hardcores or… masochists” and “File upload and download via PHP“, there was a discussion about headers. Well with the wget tool, availiable in all linux distributions, you can send any header! You can use the –header option. For instance, if you want to say that you have a referer of google, the user agent is mozilla and the keep alive is 300 you can use the following command:

wget --referer="http://www.google.com" --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" --header="Keep-Alive: 300"

Nice huh? Well whenever you want to trick a webserver, or restrictions break your nerves here is the solution!!