使用php的屏幕抓取技术 [英] screen scraping technique using php

查看:101
本文介绍了使用php的屏幕抓取技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在屏幕上抓取特定网站.我需要登录网站,然后抓取内部信息. 怎么办呢?

How to screen scrape a particular website. I need to log in to a website and then scrape the inner information. How could this be done?

请指导我.

重复项:如何在PHP中实现网络抓取工具?

Duplicate: How to implement a web scraper in PHP?

推荐答案

您要查看 curl 函数-它们将使您可以从另一个网站获取页面.您可以使用Cookie或HTTP身份验证先登录,然后再获取所需的页面,具体取决于您登录的网站.

You want to look at the curl functions - they will let you get a page from another website. You can use cookies or HTTP authentication to log in first then get the page you want, depending on the site you're logging in to.

拥有页面后,最好使用 正则表达式 抓取您想要的数据.

Once you have the page, you're probably best off using regular expressions to scrape the data you want.

这篇关于使用php的屏幕抓取技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆