Jump to content

Yahoo 999 Error.


Ninjakreborn

Recommended Posts

If your working with Yahoo API, or Yahoo Scraping, is there a way to detect the 999 error. I have an App that deals heavily with Yahoo scraping.  However, Yahoo after awhile has the 999 error.  What I want to do is detect when it returns the error, serialize all the arrays up into a database, and allow the client to try it again later when Yahoo has removed it's blocking restriction (after about an hour).

 

So, what I have thought about is doing a standard detection script. Just to see if the text 999 was found.

 

SO the function that I use to get data from Yahoo, after awhile it returns:

Warning: file_get_contents(http://siteexplorer.search.yahoo.com/search?p=http://http://www.seomarketing.com&bwm=i&bwmf=u&bwms=p&fr2=seo-rd-se&b=1501) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 999 Unable to process request at this time -- error 999 in /var/www/vhosts/seomarketing.com/httpdocs/seotools/competitiveanalysis/functions.php on line 86

What I want to do is supress that error (Which I can do with Error Reporting, or the @ symbol.  That is easy. What I also want to do is put up a conditional.

 

if (file_get_contents($url) throws a warning) {

// Do some database work.

}

I can't figure out the best way to approach this. Any advice?

Link to comment
https://forums.phpfreaks.com/topic/218212-yahoo-999-error/
Share on other sites

You'll have to find some way of reading what the response, if any, was. file_get_contents() only returns the body so you'll have to figure out a way of accessing the headers (to determine whether the HTTP status was 999).  The PHP manual page for file_get_contents() is a good start. :)

Link to comment
https://forums.phpfreaks.com/topic/218212-yahoo-999-error/#findComment-1132302
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.