Home arrow PHP arrow Determine Link Relevance and Unique Class C IP using Yahoo Links API

Determine Link Relevance and Unique Class C IP using Yahoo Links API

The Yahoo Site Explorer Inbound Links API comes in handy for a variety of purposes. You can get all sorts of data from it using PHP, from counting your backlinks to analyzing where they're coming from. This article will show you how to build a backlink checker tool that can do this and more.

  1. Determine Link Relevance and Unique Class C IP using Yahoo Links API
  2. Determine the Quality and Relevance of Inbound Links
  3. Final Project Source Code and Testing
By: Codex-M
Rating: starstarstarstarstar / 2
August 18, 2010

print this article



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
//Define unique IP address array

$iparray = array();

//Loop through the $uniquedomains array to extract domain names

while (list($key, $value) = each($uniquedomains)) {

//Get IP address of the extracted domains


//Do string manipulation to extract the Class C IP address

$findme   = '.';

$lastdot= strlen(strrchr($ipaddress,$findme));

$filterclassc= (-1) * $lastdot;

$classcip = substr($ipaddress, 0, $filterclassc);

$classcip = trim($classcip);

//Assign the Class C IP address to $iparray array


//Output the domain names to the user

echo $value;

echo '<br />';


//Extract the Unique Class C IP address in the $iparray


//Determine the number of unique Class C IP backlinks

$uniqueip = sizeof($arrayipunique);

echo '<br />';

//Compute statistics and output the results to the user

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:&nbsp;".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.

>>> More PHP Articles          >>> More By Codex-M

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: