Free PHP Code
Below is an assortment of free PHP code. Please feel free to use the various scripts and code however you see fit and let me know if you have questions! Please keep in mind that I am not a professional or expert PHP developer but a beginner just learning. That said, the PHP I wrote may not be written to a professional developer's standards. I will however come back to update any code I know how to make work more efficiently. For example, I just recently updated the HTTP Headers PHP class to use the implode array function whereas before I was echoing 15 array values and concatenating them with <br> tags. As a result, when a URL returned a short header response, there were less than 15 positions in the array therefore less than 15 values so the output of the function included extra <br> tags. Yes, I just wanted to say that.
Free PHP Functions
cURL Proxy Browse: A very basic implementation of cURL/PHP that tunnels a URL request through an HTTP proxy. Sorry, proxies not included. :) You can find them easily with a search for "buy proxies."
Web Scraping Functions: Four different ways to scrape a website all using the file_get_contents PHP function. Hopefully these will give you a good idea of how you have many options for pulling down the data you want.
W3C Validation: A simple function that passes a URL through W3C's (X)HTML, CSS, and RSS feed validation tools and simply returns whether the URL is valid or contains errors.
Domain Information: This passes a URL through NetCraft's Site Report tool and returns a shortened list of results including Nameserver, Reverse DNS, IP, and others.
Indexed Pages: A simple function that checks how many pages from a domain is indexed in Google, Yahoo!, MSN Live, and Ask.com. I might be adding more search engines soon.
HTTP Headers: This takes the array from the get_headers PHP function and displays each value on a new line. This is actually a good example of how to work with PHP arrays in general as it demonstrates a very simple usage of one.
Tag Count: This counts the number of specific tags on a web page. For example, it will tell you how many <H1> and <A> tags are present in addition to several other common HTML tags.
Random PHP Code
Referer (and UA) Cloaking: Two scripts. One for cloaking only to search engine visitors and one for cloaking to both search engines and search engine visitors.
Super Simple Login: An example of a super simple login feature for your pages. Simply set the username and password and you're off.
Dynamic Bookmark Links: A simple example of adding dynamic bookmarking functionality to your web pages. This comes in handy when you don't have a WordPress plugin or the Add This widget.
Free PHP Scripts
SEO Toolkit: The SEO Toolkit is made up of fifteen common SEO tools. The scripts are pretty easy to integrate with your site and are all licensed under a Creative Commons Attribution 3.0 Unported License.
TweepyCREEP: You tweet, I tweet, we all tweet for TweepyCREEP! This is kind of a skiddish tool. I don't recommend using it under any circumstances whatsoever.
AMNET Toolkit: These are the scripts for the SEO, PPC, and Webmaster tools page. As I update that page with new tools, I will put them here as soon as I get the chance to clean them up.
x_DB: A simple PHP template consisting of six PHP includes, a standards-compliant XHTML / CSS layout, and all the files of a typical include-driven site.
My Favorite PHP Resources
Kevin Skoglund's, "PHP Essential Training" videos from Lynda.com or Amazon. All I can say about these are that without them I'm lost. Kevin already started on the PHP Beyond the Basics edition which I imagine will be just as great.
Smaxor from oooff.com's tutorials on the basics of cURL scraping which got the ball rolling for me on a lot more than just cURL scraping. Smaxor also goes over using Zend Studio to develop in PHP.
Esrun's Blackhat SEO Videos which I think were what initially helped me realize it's possible to learn PHP. If you're into SEO and PHP then you already know about Esrun but if not, go to his website NOW idiot.






