Get Competition Keywords

One thing I found useful when searching on keywords for SEO was to Google the keywords I wanted to “own”, then grab all the top 10 results from Google. Then I would go to the site and “View Source” to see what keywords they were using and then would manually go back and review their site with other hacks to see what actually made them get in the Google Top 10. A script I wrote to simplify this is below:

require_once 'httprequest.class.php';

class harvester {

	function harvester() {

	function get_site_keywords($site) {
		$req = new httprequest();
		$html = $req->get($site);
		//echo $url;
		$html = strtolower($html);
		$a = split('<meta name="keywords" content="', $html);
		$b = split('"', $a[1]);
		return $b[0];

$harvest = new harvester();
echo $harvest->get_site_keyword("");

This class uses the httprequest class.