results";
echo "
checking item $item";
echo "
checking postcode $postcode";
$data = get_url_contents("http://www.argos.co.uk/webapp/wcs/stores/servlet/ISALTMStockAvailability?langId=-1&storeId=10001&checkStock=true&partNumber_1=$item&qasSearchTerm=$postcode");
//echo $data;
$timestamp = date("m/d/Y h:i:s a",time());
// parse for and append result to file
$rf = fopen($resultfilename, 'a') or die("can't open file");
$pos = strpos($data,"inStock");
if($pos == false) {
echo "OUT";
fwrite($rf, "
$timestamp - $postcode - $item - OUT");
} else {
echo "IN";
fwrite($rf, "
$timestamp - $postcode - $item - IN");
}
fclose($rf);
// DO IT AGAIN FOR THE 32GB ILM LAZY LOLOLOL
$item = "5086050"; // hp touchpad 32gb
// get the stock checker page
echo "results";
echo "
checking item $item";
echo "
checking postcode $postcode";
$data = get_url_contents("http://www.argos.co.uk/webapp/wcs/stores/servlet/ISALTMStockAvailability?langId=-1&storeId=10001&checkStock=true&partNumber_1=$item&qasSearchTerm=$postcode");
//echo $data;
$timestamp = date("m/d/Y h:i:s a",time());
// parse for and append result to file
$rf = fopen($resultfilename, 'a') or die("can't open file");
$pos = strpos($data,"inStock");
if($pos == false) {
echo "OUT";
fwrite($rf, "
$timestamp - $postcode - $item - OUT");
} else {
echo "IN";
fwrite($rf, "
$timestamp - $postcode - $item - IN");
}
fclose($rf);
// move curline to next
echo "curline $curline";
//$curline++;
$curline = $curline + 100;
echo "curline $curline";
$cf = fopen($curfilename, 'w');
fwrite($cf, $curline);
fclose($cf);
}
?>