Link to home
Create AccountLog in
Avatar of smetterd
smetterdFlag for United States of America

asked on

Yahoo API using file_get_contents with PHP suddenly starts to return 403 forbidden.

It has been working nicely for many months, but now starts to give me errors like this

Warning: file_get_contents(http://local.yahooapis.com/LocalSearchService/V3/localSearch?appid=rEVxJb_V34GgTvsaCZ0L0xxoKoU2CeNTsgkBkCGG9chdEqnu0ZVpFcrblKjFN2w-&query=Music&zip=&city=Brownsville&state=BROWNSVILLE&results=20) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /var/www/web1/web/centeradmin/index_reg.php on line 131
Request failed

I was pulling business listings into my site.

Can anyone give me some guidance? I couldn't find much in the Yahoo Developer documentation. Thank you!
Avatar of waygood
waygood

They have probably noticed your IP address grabbing information off their site and banned you.

Try using CURL and using settings for an anonymous proxy so they don't detect you. Although this didn't work for my with Yellow Pages ;-)
Avatar of smetterd

ASKER

I was thinking about that, but as I understand it from

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

I would receive a specific XML response if that happened.

Have you run into this exact error with Yellow Pages?
ASKER CERTIFIED SOLUTION
Avatar of waygood
waygood

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Reconfig using proxies works nice!