<?php
 
/*
 
example usage
 
weatherStack ver 1.0
 
 
You must get an API key from https://weatherstack.com/product
 
and enter it in the weatherstack.class.php file
 
*/
 
 
//turning off low level notices
 
error_reporting(E_ALL ^ E_NOTICE);
 
 
//instantiate the class
 
include('scrapestack.class.php');
 
$scrape = new scrapeStack();
 
 
//set the url parameter for the website to be scraped
 
$scrape->setParam('url','http://www.ampapps.com');
 
 
//get the response
 
$scrape->getResponse();
 
 
//output the response
 
//if json is returned we had a problem
 
if( $scrape->jsonReturned ){
 
    echo '<pre>';
 
    var_dump($scrape->response);
 
    echo '</pre>';
 
}else{
 
    echo str_replace('<','<',$scrape->response);
 
}
 
 
/*
 
Premium plans are available that allow advanced features like...
 
using SSL to get response
 
rendering javascript
 
proxy locations
 
premium addressed proxies
 
You can see what is available at https://scrapestack.com/product.
 
*/
 
?>
 
 
 |