![]() |
ImplementationRetrieving a product list as HTMLYour website can call the results for a single product as an HTML table. Scrape Shop provides an HTML file for each product you have listed, without any page code, allowing it to be easily inserted into your page. The Url to call is http://www.scrapeshop.co.uk/products_Site Code_Product name_format.html This can be easily from php:
function products($webcode,$product,$style) {
$url="http://media/products_".$webcode."_".$product."_".$style.".html";
}
if ($content=file_get_contents($url)) {
$content=preg_replace('/<<instock>>/i','<img src="http://yourwebsite/instock.jpg" border=0 />',$content);
}else{
$content=preg_replace('/<<outofstock>>/i','<img src="http://yourwebsite/outofstock.jpg" border=0 />',$content); $content=preg_replace('/<<unknownstock>>/i','<img src="http://yourwebsite/unknownstock.jpg" border=0 />',$content); return $content; return "Products not found";
}
To display the response from products(), use something like:
echo(products("aBcDeFgHiJ","productname","formatname"));
| ![]() |