Frage

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!!

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top