
近日打算买一台华为U8860手机,经过观察,网上的新蛋、卓越等各家商城的价格都波动得很厉害,有时2000元以上,有时1500元以下。可是每次降到1500元以下都是转瞬即变回2000元,很难抓住这个机会。于是我写了一个php脚本,用来监控价格,一旦降价立即发邮件通知我。
<?php
header("Content-type: text/html; charset=utf-8");
//从etao抓取价格
$html = file_get_contents('http://s.etao.com/search?q=...