PHP
  Home arrow PHP arrow Analyzing the Back Link Count from Unique Domains using Yahoo Inbound Links API
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
iPad news and developer info.
Ads by affinity 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
VPS Hosting 
Forums Sitemap 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

Analyzing the Back Link Count from Unique Domains using Yahoo Inbound Links API


By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2010-01-26


    Table of Contents:
  • Analyzing the Back Link Count from Unique Domains using Yahoo Inbound Links API
  • Get API results and do preliminary data processing
  • Filter unique domains and display in browser
  • Running and performing a test implementation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Summary: Welcome to the conclusion of a three-part series that shows you how to count the back links to your web site from unique domains using the Yahoo Inbound Links API. In the second part you learned how to pass the form variables to PHP using AJAX, process the web form input using PHP, and finally validate the root domain name URL using PHP. In this part, we discuss the details of the Yahoo API PHP script process.

    Analyzing the Back Link Count from Unique Domains using Yahoo Inbound Links API
    (Page 1 of 4 )

    Formulate a Request to Yahoo Inlinks API

     

    It is a wise programming strategy to report all errors, so the first line before communicating to the API is this one:

     

    error_reporting(E_ALL);

     

    To formulate the request, we need values for the following API variables, which we can obtain from user form input processing discussed in part two:

     

    1.) appid = OUiTAC3V35FlhDKeOScqpmw42RTY8B4BI8VUI7kB6sczVWIjJxr45D3QRWcNOPeQ--

     

    You should have your own API ID that can be obtained here: http://developer.yahoo.com/search/siteexplorer/

     

    2.) query= http://www.thisisyourrootdomainurl.com

     

    Query variables are the root domain URL.

     

    3.) omit_inlinks=domain

     

    This is the default, and cannot be obtained from form processing. Equating it to “domain” means that the API will exclude inlinks data from the same domain as the queried domain. This will ensure that all back links reported come from outside the domain.

     

    4.) entire_site=userinputoptions

     

    Possible values include 1 to get back link results pointing to the entire site, or “” (empty), to get back link results pointing only to that specific URL.

     

    5.) results=100

     

    As discussed in the first two parts, the Yahoo API can only provide a maximum of 100 back link URLs. So we say that we want the result variable to return the maximum number (100).

     

    6.) output=php

     

    This means that the Yahoo API will format the output in a serialized PHP array. You can learn about serialized PHP arrays in greater detail at the link.: 

     

    In PHP, the request URL to API in GET statements structure will be formulated as follows (incorporating all six API variables discussed above as a single GET request):

     

    $request = 'http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid= OUiTAC3V35FlhDKeOScqpmw42RTY8B4BI8VUI7kB6sczVWIjJxr45D3QRWcNOPeQ--&query='.$domainurl.'&results=100&output=php&omit_inlinks= domain&entire_site='.$options;

     



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

       

    PHP ARTICLES

    - PHP Excel Customizations: Working with Formu...
    - MVC and the Zend Framework
    - PHP: Rendering Web Pages Using the Composite...
    - PHP: Creating Dynamic Web Pages with the Com...
    - Secure Encrypting and Decrypting for Your PH...
    - PHP: Creating Single View Objects with the C...
    - PHP: View Object Collections and the Composi...
    - Securing Your PHP Website
    - Determine Link Relevance and Unique Class C ...
    - PHP Composite View Design Pattern: Introduci...
    - Facebook PHP API Applications: A Second Look
    - Secure PHP Programming
    - Facebook PHP API Applications: Basic Introdu...
    - SOAP Servers and Web Services
    - Using XPath, SOAP, and More with Web Services


    Code Analysis Tools
    Enterprise code analysis tools that deliver quality and reliable code

     


     


    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek