Yep, just find something SEO related to do, and write a script that performs the tasks. I recently did a keyword density checker - it simply gets the content of the source URL using curl, strips out the HTML tags, counts the number of time non-stop words appear, works it out as a percentage of words on the page and displays it neatly.
Most SEO tools interact with a search engine API (like the Overture API) or the actual search engine itself. They can also analyze a website. This all generally requires a remote connection to another server from your script. With PHP this can be done cleanly with the cURL library like norfstar stated. cURL is just a set of functions (in PHP) to connect to a server through HTTP, HTTPS, FTP and other protocols to query the server like a normal browser. It basically saves you the headache of dealing with the HTTP protocol yourself. You can learn about cURL here: http://www.php.net/curl Usually, if you're going to use some sort of search engine API, you may need to deal with XML as well. So it's helpful to learn how to use XML library in PHP: http://www.php.net/xml
cURL is good to know. Moreover Captcha too so someone cannot misuse that tool too much. Other things depend on what kind of tool you are making.
Python has a great program called Beautiful Soup. It is worth checking out. I have used it to grap all kinds of good stuff from websites. It allows you to parse the HTML and access it like a DOM structure almost. Comes in pretty handy.