Jump to content

Working with Yahoo API


sloth456

Recommended Posts

Hi is this what you meant?

<?php
$website = "http://yahoo.com";
$req = "http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid=YahooDemo&output=php&results=1&query=" . $website;
// Make the request
$phpserialized = file_get_contents($req);
// Parse the serialized response
$phparray = unserialize($phpserialized);
echo $phparray[ResultSet][totalResultsAvailable];
?>

You should look at these pages:

http://developer.yahoo.com/search/rest.html

http://developer.yahoo.com/common/phpserial.html

 

Link to comment
Share on other sites

Thanks very much, it was very kind of you to take the time out to show me.

 

I did look through those pages and made some code to test it out, but obviously I missed something obvious.

 

Thanks again.

 

Interestingly the number of inlinks returned by the script is slightly different than the number that site explorer returns when you go and input it manually.

 

For http://www.google.com I got 297,789,280 using the script and 297,779,166 through inputting the URL in site explorer manually.

 

Any idea why? I set the search for 'Show Inlinks: From All pages to: Only this URL'

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.