I am attempting to use Zillow to get property values for entered properties.
I have not a clue how to use this yet and looking for direction /
assistance.
I submit the information to Zllow's site via URL and it produces XML. When
you directly link to it, it comes up and a XML document.
http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=%3CZWSID%E&address=
2114+Bigelow+Ave&citystatezip=Seattle%2C+WA
How can I pass the information via form submission to this URL and get back
something I can actually use on a page on my client's site. This is my first
time with something like this, so any guidance would be appreciated. I need
this project finished this week and this is one of the last things.
Thanks!
WebDev - 20 Sep 2007 15:13 GMT
After doing a little more research, I came to this. I threw this in a normal
page and dumped it. It came back with all the correct information in XML.
However, I cannot pass the value back to the page. I tried returnType as
struct and query, but both threw errors. How can I modify this to send to a
view for display?
<cffunction name="getZestimate" access="public" returntype="struct">
<cfargument name="address" type="string" required="yes">
<cfargument name="city" type="string" required="yes">
<cfargument name="state" type="string" required="yes">
<cfset URLToPull =
"http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=X1-ZWz1ceb59lb7rf_2
avji&address=#arguments.address#&citystatezip=#arguments.city#+#arguments.state#">
<cfhttp url="#URLToPull#" method="GET" timeout="15">
</cfhttp>
<cfscript>
XMLContent = trim(cfhttp.filecontent);
XMLContent = XMLParse(XMLContent);
</cfscript>
<cfreturn XMLContent>
</cffunction>
WebDev - 20 Sep 2007 15:19 GMT
Apparently I am retarded. I just noticed that there is an XML returnType.