public function scrape($sku = null) { if (!$this->vendor_data) { require_once "lib/scrape.php"; if (is_null($sku)) { $sku = $this->sku; } $this->vendor_data = scrap_item($sku); if ($this->item_id) { if (!$this->load_local_data()) { $this->load_ebay_data(); $this->create_local(); } } if (LOCAL_SERVER) { // if(preg_match('%^B%', $sku)) // $this->vendor_data['offerprice'] /= 25; } } if ($this->vendor_data['prime'] != 'Yes') { $this->vendor_data['quantity'] = 0; } return $this->vendor_data; }
<?php set_time_limit(0); $start_time = time("now"); require_once 'lib/config.php'; require_once 'lib/scrape.php'; require_once 'lib/image/watermark.php'; require_once 'blocks/head.php'; require_once 'blocks/menu.php'; if (isset($_GET['sku'])) { $item = scrap_item($sku); } else { if (isset($_GET['url'])) { $url = $_GET['url']; //$item = scrap_item_url($url); //xp(Watermark::add_watermark($item['img'])); // xp($item); } } ?> <link rel="stylesheet" type="text/css" href="css/jquery-te-1.4.0.css"> <script type="text/javascript" src="js/jquery-te-1.4.0.min.js"></script> <style type="text/css"> form input, form textarea { width: 800px !important; } .jqte *