<?php
set_time_limit(0);
require_once("config/constant.php");
require_once("core/HttpSpy.php");
/* Version 1.0, 11th Sep 2006 - ShagoO ( shagoo@gmail.com) */
Class MySpy extends HttpSpy {
var $const;
function MySpy () {
$this->const = new Constants;
}
function getRequest ($value) {
if (array_key_exists($value, $_REQUEST)) {
return $_REQUEST[$value];
}
return false;
}
function getJoyoCosmePages () {
for ($id = 1; $id < 100; $id++) {
if ($id < 10) $id = '0'. $id;
$pageurl = '/detail/product.asp';
$goodsid = 'hibh0100'. $id;
$link = array ('path' => $pageurl, 'param' => array('prodid' => $goodsid), 'method' => 'POST');
array_push($this->links, $link);
}
$this->conds = array (
'price' => $this->const->val['joyo_price_preg_cond'],
);
// $this->_dumper($this->links);
// $this->_dumper($this->conds);
return true;
}
function getJoYoCosmeInfos () {
$this->create('grocery.joyo.com:80');
$this->execute();
return true;
}
}
//////////////////////////////////////////////////////////////////////////
// Spy Demo.
$spy = new MySpy;
$spy->getJoyoCosmePages();
$spy->getJoYoCosmeInfos();
echo "Joyo Productions Price :)<br>";
$spy->_dumper($spy->result);
?>
|