开发者

Is there any 'virtual browser' in PHP?

HI,

I want to extract data from a website but it uses some strange javascript so I can't get the job done with cURL. I want to know is there anything like virtual browser w开发者_开发知识库hich opens up the page and I can initiate click on some buttons?

If not is there any executable program to achieve this task via command line?


You have a few options:

Is there a PHP equivalent of Perl's WWW::Mechanize?

This one looks like it would fit the bill: ScriptableBrowser - http://www.lastcraft.com/browser_documentation.php

EDIT- I see that you need a virtual browser with Javascript support.. I found a few options for Ruby and Python, but nothing in PHP. Maybe you will have to drive this part of the application from a different language, or write it yourself. Or look into something like Selenium, there might be a way to use it for what you need.

More info:

How do I use Mechanize to process JavaScript?

http://pypi.python.org/pypi/DOMForm/0.0.1a/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜