Hacker's HTTP Client

phpWebHacks is an advanced HTTP client written in PHP. It simulates a real web browser, only that you use it with lines of code rather than mouse and keyboard. Using pure PHP, no Curl or other fancy dependencies needed. The functionality makes it a perfect tool for HTTP scripting with PHP.

What is HTTP scripting?

HTTP scripting simply defined as writing script to automate what you normally do with your browser. There are cases where you find HTTP scripting is useful. Consider this: you need to send 50 different emails to 50 different groups *everyday*. Since most of us are too lazy to do the task, let's hire a staff write a script to do the task for us.

Getting the Tool

HTTP scripting requires a HTTP client to make requests and handle cookies, redirects, encodings, etc. While there are many good HTTP clients out there, most of them weren't designed for HTTP scripting. And forget Curl.

So I wrote my own HTTP client that has the features needed for HTTP scripting. Complete features:

  • Support HTTP/1.1
  • Fetch web pages.
  • Submit forms and upload files.
  • Support https.
  • Support HTTP cookies.
  • Support HTTP redirects and Meta-refresh redirects.
  • Support HTTP Authentication.
  • Support proxy server.
  • Support gzip encoding.
  • Logging of HTTP streams for full debugging.
  • Parsing HTML forms.
  • Custom User-Agent.

Here are some cool things you can do with phpWebHacks: grabbing GMail/Yahoo/MSN contact list, download FLV videos from YouTube, send mails, and many more.

See more HTTP scripting examples and download phpWebHacks now!