搜索关键字「39000038」,
http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038
因为仅有一款,页面会自动跳转到
http://www.mouser.cn/ProductDetail/Molex/39-00-0038/?qs=%2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs%3d搜索关键字「3900003」,有多款产品是一个列表
http://www.mouser.cn/Search/Refine.aspx?Keyword=3900003我想知道,它是直接在.net中直接判断然后跳转的,还是用js判断跳转的我要用php的file_get_content()函数抓取
http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038
如何才能跟踪到
http://www.mouser.cn/ProductDetail/Molex/39-00-0038/?qs=%2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs%3d
http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038
因为仅有一款,页面会自动跳转到
http://www.mouser.cn/ProductDetail/Molex/39-00-0038/?qs=%2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs%3d搜索关键字「3900003」,有多款产品是一个列表
http://www.mouser.cn/Search/Refine.aspx?Keyword=3900003我想知道,它是直接在.net中直接判断然后跳转的,还是用js判断跳转的我要用php的file_get_content()函数抓取
http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038
如何才能跟踪到
http://www.mouser.cn/ProductDetail/Molex/39-00-0038/?qs=%2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs%3d
解决方案 »
- 50分求一条sql语句
- 关于selected option的问题
- 关于PHP正则过滤空字符null的问题
- var定义变量作用
- 验证码不显示 各种方法都试过了
- 请问在PHP中怎么转码?
- [讨论|共享]是不是有一种这样子生成静态新闻网页的方法呀?大家看看。
- 一个好建议,版主请进来看看。
- php在linux下面传大文件有问题!!!
- $$$紧急请教用PHP如何发送html格式的邮件?不能用附件形式,要求用Foxmail这样的软件直接可以浏览。谢谢!给分!
- 哪位大侠知道我的Apache2.4.3为什么启动报错Cannot load php5apache2_4.dll into server呢
- 这个正则怎么写啊?
$ch = curl_init();
curl_setopt(CURLOPT_AUTOREFERER,1,$ch)
先采集一个列表页(没有的话只能抓详细页的内容来生成)生成一个列表页,采集详细页是后面的事。
实例是这样的:http://www.rightic.com/DG/Search?partNumber=39000038&Ric5=Ric5&ROHM=ROHM&Traco=Traco&HKC=HKC&API=API我不是单单采集一个产品,而是用户自己输入「关键字」,然后页面根据这个「关键字」来采集目标网页,生成一个「列表页」所以我采集的页面是
http://www.mouser.cn/Search/Refine.aspx?Keyword=关键字如果直接跳转到详细页,我现在没有办法得到这个详细页的地址
function curl_get($durl) {
$t = parse_url($durl);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$durl);
curl_setopt($ch, CURLOPT_TIMEOUT,5);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_REFERER, "http://$t[host]/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$r = curl_exec($ch);
curl_close($ch);
return $r;
}echo curl_get( 'http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038');