This is the continuation of a series on the Yahoo Site Explorer Links API tutorial in PHP. It is suggested that you will read and understand the following tutorials if you are new to Yahoo Links API: Using the Yahoo Site Explorer Inbound Links API Getting Data from Yahoo Site Explorer Inbound Links API using PHP Analyzing the Back Link Count from Unique Domains using Yahoo Inbound Links API Building a Form to Count Back Links Using Yahoo Inbound Links API Count Backlinks from Unique Domains Using Yahoo Inbound Links API In those five articles that are part of the series, you will not find a discussion of how to make a backlink checker tool that will also analyze the inbound link relevance and check if those unique domains belongs to unique class C IP address. This will be covered deeply in this tutorial. {mospagebreak title=How to Sort Out Unique Class C IP Addresses The original source code of the above tutorial series is here: http://www.php-developer.org/wp-content/uploads/scripts/countuniquelinks.zip It is not capable of sorting out unique class C IP addresses. However, since the script is capable of extracting the domain name, you can get the IP address of the website server using the gethostbyname() function in PHP. Using string manipulation functions, you can arrive at the Class C IP address. The following script is added to the original code as follows: //Start of Unique Class C IP Address Script
while (list($key, $value) = each($uniquedomains)) {
$ipaddress=gethostbyname($value);
$findme = '.'; $lastdot= strlen(strrchr($ipaddress,$findme)); $filterclassc= (-1) * $lastdot; $classcip = substr($ipaddress, 0, $filterclassc); $classcip = trim($classcip);
$iparray[]=$classcip;
echo $value; echo '<br />'; } //Extract the Unique Class C IP address in the $iparray $arrayipunique=array_unique($iparray);
$uniqueip = sizeof($arrayipunique); echo '<br />';
echo "In those $uniqueinsample unique domains, there are $uniqueip domains in unique Class C IP.<br />"; $uniquebacklinksuniqueclassc= ($uniqueip/$count)*($totalbacklinksnotunique); echo "<b>ESTIMATED TOTAL BACKLINKS FROM UNIQUE DOMAINS IN UNIQUE CLASS IP POINTING TO $conditions: ".round($uniquebacklinksuniqueclassc).'</b>'; echo '<br />'; echo '<br />'; //End of Unique Class C IP address script IMPORTANT NOTE: Do not worry about the complete and final source code of this tutorial, it will be provided at the end of this tutorial along with a link.
blog comments powered by Disqus |
|
|
|
|
|
|
|