我已经在我的Google App Engine项目中成功使用了Zillow API数月,但由于API要求CAPTCHA(这是疯狂的),它已经随机停止工作。
该代码适用于我的本地主机Google App Engine,它可以在我的GoDaddy服务器上运行,它可以在我的ServerBeach服务器上运行,但在推送到生产Google App Engine时失败(即使我使用不同的帐户和不同的项目)。
我将代码剥离到最小的测试表单,并将此单个文件上传到全新的Google App Engine项目中,但仍然失败(要求获得CAPTCHA响应,而不是提供正确的XML结果):
$ZILLOW_ZWSID = '<MY ZILLOW API ID>';
$address = "1600 Amphitheatre Pkwy";
$zip = "94043";
$shouldgetrentestimate = false;
$endpoint = 'http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=%s&address=%s&citystatezip=%s&rentzestimate=%s';
$url = sprintf($endpoint, $ZILLOW_ZWSID, urlencode($address), urlencode($zip), urlencode($shouldgetrentestimate));
printf("zillow url: %s\n\n", $url);
$resultxml = file_get_contents($url);
print $resultxml;
我已经创建了新的Zillow API ID,并尝试使用它们来查看我的Zillow API ID是否出现问题,并且它们的行为方式相同(除了生产Google App Engine以外的任何地方都有效)。