2009
06.12

Black_80's_death_Metal_Band

Someone recently asked for a way to quickly pull basic page info from a website, so I thought I’d go ahead and share the code for a very easy PHP script that will retrieve the page title, meta keywords and meta description for any website.

<?php
$url = “http://www.shamwow.com";
$fp = fopen( $url, ‘r’ );
$content = “”;

while( !feof( $fp ) ) {
$buffer = trim( fgets( $fp, 4096 ) );
$content .= $buffer;
}

$start = ‘<title>’;
$end = ‘<\/title>’;

preg_match( “/$start(.*)$end/s”, $content, $match );
$title = $match[ 1 ];
$metatagarray = get_meta_tags( $url );
$keywords = $metatagarray[ "keywords" ];
$description = $metatagarray[ "description" ];  

echo “<div><strong>URL:</strong> $url</div>\n”;
echo “<div><strong>Title:</strong> $title</div>\n”;
echo “<div><strong>Description:</strong> $description</div>\n”;
echo “<div><strong>Keywords:</strong> $keywords</div>\n”;
?>

There’s your basic script. Replace where it says www.shamwow.com with whatever site you want to pull data from. The results will look like this:

URL: http://www.shamwow.com
Title: ShamWow® Official Website – Holds 12 Times Its Weight In Liquid
Description: You’ll Be Saying Wow Every Time!
Keywords:You’ll Be Saying Wow Every Time!, official tv website, as seen on tv

Where to go from here? There are millions of different uses from SERP reporting to page title & keyword comparison. Heck, you could even throw a form on it and present it as an SEO tool on your website (almost every ‘toolset’ you find online has something similar)….

2009
05.12

free_first_and_lastname_database_csv

Matt over on the WF forums had recently posted a SQL database that he had created comprised of first and last names, a great resource to have handy when auto-generating identities, accounts, comment authors, etc.. While it was a pretty large list, it still wasn’t as complete as the one i’ve been using over the years (also it was separated by gender and used one giant table instead of segmenting the first and last names into two). I figured that if I was going to complain about something free, I might as well provide something in return, so here’s your chance to download a free first and last name database in both SQL and CSV formats (pick your poison). There are a total of 5494 first-names and 88799 last-names allowing for a never-ending source of randomly generated full names.

Free Name Database Download – SQL:
.sql File | .zip File

Free Name Database Download – CSV:
First Names (5494) – .csv File & Last Names (88799) – .csv File
I also compressed them both for easy download – .zip of both files

enjoy.

2009
04.30

I can’t stop watching this clip over and over again… it’s a little off-topic but very cool none-the-less. It’s a video named “Inspired Bicycles” and it’s just that, bike riders doing unimaginable stunts set to a killer soundtrack (Band 0f Horses – The Funeral). See for yourself, these guys are incredible!

Comments Off