Download the PHP package verticaltab/pillow without Composer
On this page you can find all versions of the php package verticaltab/pillow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download verticaltab/pillow
More information about verticaltab/pillow
Files in verticaltab/pillow
Package pillow
Short Description Zillow PHP client
License MIT
Homepage https://github.com/VerticalTab/Pillow
Informations about the package pillow
Pillow - Zillow PHP client
This library provides a PHP interface for the Zillow API.
See: zillow.com for more information.
Currently, only these API calls are supported:
http://www.zillow.com/howto/api/GetSearchResults.htm
http://www.zillow.com/howto/api/GetChart.htm
http://www.zillow.com/howto/api/GetComps.htm
If there is one you'd really like to see implemented, you can create an issue and/or fork, implement, and submit a pull request.
Requirements
PHP >= 5.3
Installation
The preferred method of installation is composer. In you project root (not web root), create a minimum composer.json file:
{
"require": {
"VerticalTab/Pillow": "x.x.x"
}
}
Replace "x.x.x" above with the tag number you want to use. Note: see VeriticalTab/Pillow Packagist page for latest release information.
Next, get composer and use it to install (again, in your project root)
$ wget http://getcomposer.org/composer.phar
$ php composer.phar install
This will put the library into your vendors directory.
Updating
To update after installation, edit the "require" section in composer.json. Then update:
$ php composer.phar update
Examples
File: simple.php
<?php
require 'vendor/autoload.php';
use VerticalTab\Pillow\Service;
$key = 'your zillow api key';
$s = new Service($key);
$results = $s->getSearchResults('2114 Bigelow Ave', '98109');
$property = $results->current();
"Results:" . PHP_EOL;
echo "zpid : " . $property->zpid . PHP_EOL;
echo "city : " . $property->city . PHP_EOL;
Run simple example
$ php simple.php
File: chart.php
<?php
require 'vendor/autoload.php';
use VerticalTab\Pillow\Service;
$key = 'your zillow api key';
$s = new Service($key);
$results = $s->getSearchResults('2114 Bigelow Ave', '98109');
$property = $results->current();
echo "chart url : " . $property->chart->url . PHP_EOL;
Run chart example:
$ php chart.php
File: comps.php
<?php
require 'vendor/autoload.php';
use VerticalTab\Pillow\Service;
$key = 'your zillow api key';
$s = new Service($key);
$results = $s->getSearchResults('2114 Bigelow Ave', '98109');
$property = $results->current();
foreach($property->comps as $i => $comp) {
echo "\tcomp : " . $i . PHP_EOL;
echo "\tzpid : " . $comp->zpid . PHP_EOL;
echo "\tzestimate : " . $comp->zestimate->amount . PHP_EOL;
echo PHP_EOL;
}
Run comps example:
$ php comps.php