문제

I can't seem to get out of the gate. I have the following which gives nothing but white screen...

    <?php 
 $url = "http://www.zillow.com/webservice/GetDemographics.htm?zws-id=<my api      key>&state=CO&city=Denver&neighborhood=Stapleton";
 $data = simplexml_load_string(file_get_contents($url));
 print_r($data); 
?>

Not sure what I'm doing wrong.

thanx for your help!!

도움이 되었습니까?

해결책

It works for me, maybe you don't have libxml installed with PHP? The blank screen could be the result of a fatal error.

Try changing your script to:

<?php 
error_reporting(E_ALL); // log all errors
ini_set('display_errors', 'on'); // display errors in output, rather than to error_log

$url = "http://www.zillow.com/webservice/GetDemographics.htm?zws-id=<my api      key>&state=CO&city=Denver&neighborhood=Stapleton";
$data = simplexml_load_string(file_get_contents($url));
print_r($data); 

The first two lines will likely result in some sort of error message being displayed which would be a blank page if display_errors is off.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top