| Subcribe via RSS

Geolocation by IP Address with PHP

January 5th, 2010 | No Comments | Posted in API, PHP, Resource

Something kind of interesting happened today. I was going through my log files and noticed a query for “joe Tinsley woodland park” the query originated from “Medford, Massachusetts”. Woodland Park was an elementary school located on an air force base in South Carolina that I attended when I was a kid. I take it that someone from my past is trying to locate me. That’s pretty cool. The crazy part is I just noticed that I don’t have anyway for anyone to contact me via my website… Ha! I make the craziest moves sometimes.
Well I’ve mentioned all of this to say If you’re looking for a way to pull Geolocation Data from a single IP address try IPpages.com’s APIs. I’ve been using them for some time now and the service is pretty good. It does require some programming knowledge to the extract the data from the XML results.
Please let me know if I can help with any programming questions (PHP only!).

Tags: , ,

Google XML Sitemap: Export Title, Description and Keywords to Excel

December 8th, 2009 | No Comments | Posted in Google, PHP, Programming, SEO

Google XML Sitemap: Download the Title, Description & Keywords tags from your sites webpage via your Google XML sitemap and then export the data into a excel spreadsheet. I’m not totally sure what to call this tool yet. I started out creating something else and took a totally different direction. That’s not to say this is not a useful tool. Basically if you’ve ever been in a situation and wonder how many URL’s are included in a Google XML sitemap, then this application will help you. Or if you’ve ever been in a pickle and wondered how well my Titles, Descriptions, or Keywords Tags are optimized, then this application will help yuo also. Once you submit your Google XML sitemap the application will download all of the URL’s included in your XML Sitemap and then one URL at a time goes out and fetches the Title and Meta Information. It then runs the character count from this data against what is deemed by Yahoo as being a well formatted Title and Meta Tag by YSSP standards. Title 70 characters in length, Description 170 characters in length, and 12 Keywords. I took a look at the Google Webmaster rule set also and added in some padding.
So for example the application will color the character count number Green if the Title falls in-between 60 and 70 characters. Then Red if the count is over 70 characters and Purple if it’s under 60 characters. This color theme is used also for the Description and the Keywords.

The complete thresholds includes.
Title: >=60 <=70 Good; > 70 Red; < 60 Purple
Description: >=150 <=170 Good; > 170 Red; < 150 Purple
Keywords:   >=10 <=12 Good; > 12 Red; < 10 Purple

Google Sitemap Tool
Creating and submitting Sitemaps

Tags: , ,

Reverse IP Lookup, FREE PHP Tool

November 17th, 2009 | No Comments | Posted in PHP, Programming

Reverse IP Lookup, Search for domains hosted on a single IP address

As some of you have probably already noticed I’ve added a new link/script/tool to the site. I have a bunch of these one offs scripts scattered around the internet. I’m currently trying to rope them all into one location.

But basically this tool will look ups and reports what other domains are hosted on a particular server. It’s actually fairly simple and works off of an operator that most are not aware of.

How it works. Simply just add a domain with the dubb and the tool will do the rest. I capped it off at 30 results. So even if there are thousands the tool will only report back 30 other domains.

Tags: ,

Google Favicon API, PHP Code

November 10th, 2009 | No Comments | Posted in API, Google, PHP, Programming

I ran into something very, very interesting today. Google Favicon API
(A Favorite Icon API)
. It’s an API that allows you to pull websites Favicons, plus the API dynamically converts the image into a PNG format. This actually comes at a great time because I was just thinking the other day that since I have the option to add offsite URL’s to my site now. Would’nt it would be supa cool if I could also included their Favicon? To beak it down if you look into my site’s right side navigation you will see the “Links” category. Well I thought it would be nice, I mean supa cool if I had a script that could automatically include the corresponding sites Favicons.  And BAM! Thanks Google Favicon API. I wrapped this APIs up with some cURL and a little PHP and now I have a working PHP function. I don’t know much about the Google Favicon API but it looks like it’s been around for about a year. So it’s a good chance that this API could suddenly up and move or disappear all togehter. Basically what I’m saying is I don’t know how long the good times will last. So in my opinion I suggest you consider the use of this script temporary until you can get the time to build a much reliable one yourself.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?PHP
function getFavicon($var){
$filName=substr($var,0,-4);
$fp = fopen ('folder/'.$filName.'.png', 'w+');
$ch = curl_init('http://www.google.com/s2/favicons?domain='.$var);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
fclose($fp);

}

$var='techcrunch.com';
getFavicon($var);
?>

Tags: , , ,

RSS Auto Discovery, Do it now

November 10th, 2009 | No Comments | Posted in Programming, XML

Added a dynamic RSS Auto discovery feature to my site today. Yea nothing earth shattering but I thought it was still pretty cool. Then for shsss and giggles I started surfing the web to see who didn’t have one. I was shocked to see that there’s a lot of big named website not taking advantage of this small addition.

For example

  • Mint.com, http://www.mint.com/blog/ – Mint offers a RSS Feed but not a Auto Discovery feature hosted off of the home page. This option is only available to you when you visit the Feedburner hosted page.
  • My.barackobama.com, http://my.barackobama.com/page/content/hqblog -  Basically the same thing as Mint.com. You only see this option on the Feedburner hosted page. And not off the home page. (I’m not even going to get into why they are not using the branded feedburner solution.)
  • Whitehouse.gov, http://www.whitehouse.gov/ – They DO offer a RSS Feed and a RSS Auto Discovery option on the home page. Good deal!

This is actually pretty interesting because it’s so simply to implement and in doing so will make things easier for your readers. Part of the game plan is to get people involved, why not make it easier from then to keep up.

So anyway here some code and some links to reference if you want to add this feature to your site.

1
2
3
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.josephtinsley.com/feed/rss.xml">

<link rel="alternate" type="application/rss+xml" title="ADD SITE TITLE HERE" href="ADD RSS FEED URL HERE"/>

Tags: ,

Display duplicate Keywords from your Title Tag, PHP Code

November 6th, 2009 | No Comments | Posted in PHP, Programming

Display duplicate Keywords from your Title Tag, PHP Code. I whipped this up really quick so please don’t criticize. It’s probably going to be the basis to something much bigger. But I was recently in the need of a script that could flag and report what keywords I had repeated in a list of given title tags.

You all in the SEO business understand that repeating keywords a bunch of times (A.K.A keyword stuffing) is not a tactic that should be practiced.

Feel free to use it and twist it up, but please let me know what you come up with. This would probably be even more valuable if there was some kind of white list feature to take advantage of. I’ll add it if I end up growing this out.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?
function whosUnique($str){
   $parsStr=explode(' ', strtolower($str) );
   $wordArray=array_unique($parsStr);
   $result = array_diff_assoc($parsStr, $wordArray);

return array($str,$parsStr,$wordArray,$result);
}

$str="Briefcases &amp; Totes - Business Tote, Men's Briefcases, Women's Briefcases";

$result = whosUnique($str);

print '<pre>';
print_r($result);
print '</pre>';
?>

Tags: , ,