Yahoo! has many APIs, you’ll probably want to use BOSS (Build your Own Search Service).
A very quick and basic example looks like:
$search = 'yahoo boss example';
// Get your App ID from https://developer.apps.yahoo.com/wsregapp/
$appid = '058Q0srV34FFO3r1qJWa4vzhMggarrR3fDUzm8bH5QfylNUaOAtUp33s6qFnmtt3';
$apiurl = 'http://boss.yahooapis.com/ysearch/web/v1/' . urlencode($search) . '?appid=' . urlencode($appid);
// Fetch and decode search results
$json = file_get_contents($apiurl);
$data = json_decode($json, TRUE);
$result_count = $data['ysearchresponse']['totalhits'];
// Tell it like it is: Found 446,413 results for "yahoo boss example".
echo 'Found ' . number_format($result_count) . ' results for "' . $search . '".';
<? php
$search = 'yahoo boss example';
// Get your App ID from https://developer.apps.yahoo.com/wsregapp/
$appid = '058Q0srV34FFO3r1qJWa4vzhMggarrR3fDUzm8bH5QfylNUaOAtUp33s6qFnmtt3';
$apiurl = 'http://boss.yahooapis.com/ysearch/web/v1/' . urlencode($search) . '?appid=' . urlencode($appid);
// Fetch and decode search results
$json = file_get_contents($apiurl);
$data = json_decode($json, TRUE);
$result_count = $data['ysearchresponse']['totalhits'];
// Tell it like it is: Found 446,413 results for "yahoo boss example".
echo 'Found ' . number_format($result_count) . ' results for "' . $search . '".';
?>
my yahoo App ID:
Congratulations, karimian61, your application is now registered! Yeah!
* Your application id is EloAStvIkY2GDBJ1c4OkSgvH9zFNwyGvjr4-
* Your shared secret is 8800b5727ab3ec3b2b76f22da7bce290
* For application entrypoint -> http://mysiteevaluate.com/website.php
What makes you say that it does not work? It is best to give us as much information as possible since scripts can “not work” for many, many reasons! Does it give any errors? Anything at all?
Off Topic:
P.S. Please don’t PM me every time you reply. It is irritating! I browse the forums for replies regularly throughout the day, on my own schedule and will get to your replies eventually.
Salathe Excuse for sending pm.
I have this error :
Parse error: syntax error, unexpected T_VARIABLE in /home/mysitee/public_html/1.php on line 2
For this code:
<? php
$search = 'yahoo boss example';
// Get your App ID from https://developer.apps.yahoo.com/wsregapp/
$appid = '058Q0srV34FFO3r1qJWa4vzhMggarrR3fDUzm8bH5QfylNUaOAtUp33s6qFnmtt3';
$apiurl = 'http://boss.yahooapis.com/ysearch/web/v1/' . urlencode($search) . '?appid=' . urlencode($appid);
// Fetch and decode search results
$json = file_get_contents($apiurl);
$data = json_decode($json, TRUE);
$result_count = $data['ysearchresponse']['totalhits'];
// Tell it like it is: Found 446,413 results for "yahoo boss example".
echo 'Found ' . number_format($result_count) . ' results for "' . $search . '".';
?>
Welcome to the Developer Network.
Registration Complete
Congratulations, karimian61, your application is now registered! Yeah!
* Your application id is EloAStvIkY2GDBJ1c4OkSgvH9zFNwyGvjr4-
* Your shared secret is [[SECRET STRING]]
* For application entrypoint -> http://xxx.com/website.php
and for $appid = ‘058Q0srV34FFO3r1qJWa4vzhMggarrR3fDUzm8bH5QfylNUaOAtUp33s6qFnmtt3’;
please help me is true
for my $appid = ‘EloAStvIkY2GDBJ1c4OkSgvH9zFNwyGvjr4-’;