sparkapi / sparkapi4p2

A PHP wrapper for the flexmls REST API.
GNU General Public License v3.0
26 stars 28 forks source link

How to download listings into CSV file, produce a 'create table' sql script for property data, and download photo URLs #60

Open thancock1 opened 5 months ago

thancock1 commented 5 months ago

Sorry if this is a noob question, Have many years of experience with PHP, MySQL, BASH, and PhRETS. Getting started with Spark API, and looking for a basic overview or orientation on how to accomplish the same thing I did with PhRETS. In PhRETS, I had:

1)a script that downloaded listings based on a query into a CSV file 2)a script that produced a 'Create Table' SQL script for storing property data 3)a script that downloaded photo URLS for properties

Looking for code that represents the above. I believe I have a configuration that's at least capable of logging into the Spark API, and accessing MLS data. I can run: "php examples.php" and fetch data, but it all seems to be in a kind of array dump format. How can this data become usable? Suppose I could use grep and sed on the array dump data, but I don't think that's a solution.

Also noticed I'm only getting 10 records at a time, and much of the data is just '***'

If anyone can point me in the right direction, would be much appreciated. Thank you.