title: 403 Forbidden Error with local.yahooapis geocode request
body: <p>I am trying to make a geocode request against the local.yahooapis.com geocode interface.  This was working yesterday, with the same AppID, and a hardcoded address.  Now I have broken up the query string and programmatically filled it from a database.  the api returns a 403 - Forbidden error.  I'm not sure if I have hit some throttling restrictions, or messed up my request in refactoring.</p>
  
  <p>Request, with "MY_APP_ID" subbed out:</p>
  
  <pre><code>Warning: file_get_contents(http://local.yahooapis.com/MapsService/V1/geocode?appid=MY_APP_ID&amp;street=6727+N+5TH+ST&amp;city=PHILADELPHIA&amp;state=PA&amp;output=php) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden 
  </code></pre>
  
  <p>And the wireshark of the entire back and forth:</p>
  
  <pre><code>GET /MapsService/V1/geocode?appid=MY_APP_ID&amp;street=BOX+269&amp;city=TOUGHKENAMON&amp;state=PA&amp;output=php HTTP/1.0
  
  Host: local.yahooapis.com
  
  
  
  HTTP/1.1 403 Forbidden
  
  Date: Mon, 19 Jul 2010 14:46:42 GMT
  
  P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
  
  Connection: close
  
  Content-Type: text/html; charset=iso-8859-1
  
  
  
  &lt;!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;&lt;head&gt;&lt;title&gt;Yahoo! - 403 Forbidden&lt;/title&gt;&lt;style&gt;
  /* nn4 hide */ 
  /*/*/
  body {font:small/1.2em arial,helvetica,clean,sans-serif;font:x-small;text-align:center;}table {font-size:inherit;font:x-small;}
  html&gt;body {font:83%/1.2em arial,helvetica,clean,sans-serif;}input {font-size:100%;vertical-align:middle;}p, form {margin:0;padding:0;}
  p {padding-bottom:6px;margin-bottom:10px;}#doc {width:48.5em;margin:0 auto;border:1px solid #fff;text-align:center;}#ygma {text-align:right;margin-bottom:53px}
  #ygma img {float:left;}#ygma div {border-bottom:1px solid #ccc;padding-bottom:8px;margin-left:152px;}#bd {clear:both;text-align:left;width:75%;margin:0 auto 20px;}
  h1 {font-size:135%;text-align:center;margin:0 0 15px;}legend {display:none;}fieldset {border:0 solid #fff;padding:.8em 0 .8em 4.5em;}
  form {position:relative;background:#eee;margin-bottom:15px;border:1px solid #ccc;border-width:1px 0;}
  #s1p {width:15em;margin-right:.1em;}
  form span {position:absolute;left:70%;top:.8em;}form a {font:78%/1.2em arial;display:block;padding-left:.8em;white-space:nowrap;background: url(http://us.i1.yimg.com/us.yimg.com/i/s/bullet.gif) no-repeat left center;} 
  form .sep {display:none;}.more {text-align:center;}#ft {padding-top:10px;border-top:1px solid #999;}#ft p {text-align:center;font:78% arial;}
  /* end nn4 hide */
  &lt;/style&gt;&lt;/head&gt;
  &lt;body&gt;&lt;div id="doc"&gt;
  &lt;div id="ygma"&gt;&lt;a href="http://us.rd.yahoo.com/403/*http://www.yahoo.com"&gt;&lt;img
  src=http://us.i1.yimg.com/us.yimg.com/i/yahoo.gif
  width=147 height=31 border=0 alt="Yahoo!"&gt;&lt;/a&gt;&lt;div&gt;&lt;a
  href="http://us.rd.yahoo.com/403/*http://www.yahoo.com"&gt;Yahoo!&lt;/a&gt;
  - &lt;a href="http://us.rd.yahoo.com/403/*http://help.yahoo.com"&gt;Help&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;div id="bd"&gt;&lt;h1&gt;Sorry, Forbidden.&lt;/h1&gt;
  You don't have permission to access this URL on this server.&lt;P&gt;
  &lt;P&gt;Additionally, a 404 Not Found
  error was encountered while trying to use an ErrorDocument to handle the request.
  &lt;p&gt;Please check the URL for proper spelling and capitalization. If
  you're having trouble locating a destination on Yahoo!, try visiting the
  &lt;strong&gt;&lt;a
  href="http://us.rd.yahoo.com/403/*http://www.yahoo.com"&gt;Yahoo! home
  page&lt;/a&gt;&lt;/strong&gt; or look through a list of &lt;strong&gt;&lt;a
  href="http://us.rd.yahoo.com/403/*http://docs.yahoo.com/docs/family/more/"&gt;Yahoo!'s
  online services&lt;/a&gt;&lt;/strong&gt;. Also, you may find what you're looking for
  if you try searching below.&lt;/p&gt;
  &lt;form name="s1" action="http://us.rd.yahoo.com/403/*-http://search.yahoo.com/search"&gt;&lt;fieldset&gt;
  &lt;legend&gt;&lt;label for
  </code></pre>
  
  <p>Can you identify what I am doing wrong, or tell me where I can check my AppID for any new restrictions?</p>
  
  <p>Update:</p>
  
  <p>I tried with a brand new appid.  I used a 5 second sleep in the script, and only made 3 requests.  The very first request failed.  No idea what is causing this problem now.</p>
  
  <p>Warning: file_get_contents(<a href="http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=6727+N+5TH+ST&amp;city=PHILADELPHIA&amp;state=PA&amp;output=php" rel="nofollow noreferrer">http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=6727+N+5TH+ST&amp;city=PHILADELPHIA&amp;state=PA&amp;output=php</a>) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\wamp\www\Smartphone\updategeo.php on line 23
  1 
  Warning: file_get_contents(<a href="http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=7400+OXFORD+AVE&amp;city=PHILADELPHIA&amp;state=PA&amp;output=php" rel="nofollow noreferrer">http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=7400+OXFORD+AVE&amp;city=PHILADELPHIA&amp;state=PA&amp;output=php</a>) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\wamp\www\Smartphone\updategeo.php on line 23
  2 
  Warning: file_get_contents(<a href="http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=2+W+FOURTH+ST&amp;city=BRIDGEPORT&amp;state=PA&amp;output=php" rel="nofollow noreferrer">http://local.yahooapis.com/MapsService/V1/geocode?appid=orQG_ZLV34EmNvmFaIKpOd5RSu1aBsDEfoxNeJBFhr5VUM5dItKbyXLjoMYi0Q--&amp;street=2+W+FOURTH+ST&amp;city=BRIDGEPORT&amp;state=PA&amp;output=php</a>) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\wamp\www\Smartphone\updategeo.php on line 23
  3 </p>
  
  <p>Edit again: my best guess is that since im working on a dev box, and the appId was generated for a different domain, its rejecting it.  How can i determine if that is correct?  This doesnt make 100% sense to me though, as this code did work at some point.</p>