Jump to content

Pulling Data from XML Page


Nathan
 Share

Recommended Posts

  • Administrators

What's the best method to pull data from this page?  I want to grab different details and insert into my database using PHP.  I assume I have to do something with CURL?

http://www.zillow.com/webservice/GetDeepSearchResults.htm?&zws-id=REDACTED&address=1016+Redwood+Lane&citystatezip=Liberty%2C+Missouri+64068

Link to comment
Share on other sites

  • Administrators

Got it done with file_get_contents command.

 

Example:

<?php
$xml=file_get_contents("http://www.zillow.com/webservice/GetDeepSearchResults.htm?&zws-id=REDACTED&address=1016+Redwood+Lane&citystatezip=Liberty%2C+Missouri+64068");
$xml = simplexml_load_string($xml);

$totalRooms=$xml->response->results->result->totalRooms;

echo $totalRooms;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...