20100826

Web Automation with the PHP Programming Language and cURL Module

Here is a showcase of web automation software I had written myself using the programming language PHP and a browser emulation module called cURL. If you want to take a look at the code, feel free to download it.

What is PHP?
Also known as Hypertext Preprocessor, PHP is a very popular scripting language mainly used among web developers to produce dynamic web pages. Pages that can load quickly, from databases of information, and are interactive. Unlike a typical web page using just markup languages like HTML and CSS.

What is cURL?
cURL is a module or library you can install on PHP that lets you transfer information via web protocols, such as HTTP. Think of cURL as a browser, kind of like Internet Explorer or Firefox. Only instead of you, the internet user, viewing the web pages with your eyes and clicking around navigating with your mouse, cURL can help read what a website is saying, and can spit back information in response. Like a browser, it's a way for two computers to talk to each other over the internet.

PHP + cURL = Powerful combination that mimics a human using a web browser
Using these two powerful pieces of software, I have written and developed my own software scripts that can mimic your typical web user as if it were a person visiting the site.

Twtr
This software program revolves around Twitter, the popular social networking website. Twtr uses PHP/cURL to access Twitter's API, a REST oriented API given out freely to developers to make apps and games for the site. Twtr uses the login information for all the Twitter accounts you give it from a text file, grabs a proxy for each one, and then automatically updates your Twitter account automatically. So you can say whatever you want, automatically, without even being at your computer. You can set it to post once a week, everyday, or even every minute.
Download Twtr

WPBlogr
Perhaps my most sophisticated software in this PHP/cURL portfolio. WPBlogr allows you to automatically post to Wordpress blogs that you control using XML-RPC which is the direct predecessor to the increasingly popular SOAP web services. Some bloggers have multiple blogs, and seriously, who wants to spend time logging into each one of them one by one and posting? In a few text or CSV files, list the blog URLs, the login credentials, and the topics you want to write about, then WPBlogr takes it from there. The software logs into each blog, then writes and publishes a post about each topic you list. The coolest part about it was that, if you wanted, it could automatically pull a fair use amount of text from Google BlogSearch based on each keyword you gave it, shuffle sentences and words, and still make the paragraph readable. You could easily set it to how many sentences you wanted to output per post. All with the magic of PHP programming.
Download WPBlogr


Notebookr
Sometimes setting up a multitude of quick web pages was necessary in my line of work. Google used to provide a service called Google Notebook (no longer in development), which basically allowed you to create little note pages and share them on the web. Notebookr had the ability to log into Google Notebook with your account, and create multiple notebook pages based on a list of keywords you give it in a text file. Probably the coolest thing about this program was it automatically scoured the web for text related to your keywords, scooped it up and wrote a little paragraph about your subject.
Download Notebookr

Rubylinkr
This is a simple little script that used the URL shortener service RubyURL. You see people using URL shorteners like Bit.Ly on Twitter all the time.  But instead of entering them in manually, one by one, my programmed script, Rubylinkr takes a list of links that you give it, runs them through RubyURL, and outputs all the nice shortened URLs in a neat little text file, ready for action.
Download Rubylinkr