dpfwhb7470 2014-10-11 18:58
浏览 23
已采纳

指定数据的服务器端解析器(?)[关闭]

I'm learning php and website development in general. Currently I'm trying to write a script in php that would access a website as Internet Explorer (important) and look for a specified word/pattern everywhere possible. Simply parsing doesn't do the job.

The thing is, I can do that manually - I open website X and press F12 in Internet Explorer->debugging section and I search there. However I have no idea how to implement such a thing in php or any other language.

TL:DR Need to extract data from a webpage the same way I do it manually (explained in paragraph above). However, simply parsing doesn't do the job. I need to achieve that in php or some other server side language.

  • 写回答

1条回答 默认 最新

  • dream0776 2014-10-11 19:05
    关注

    In addition to limited approaches such as file_get_contents followed by a string search (or XML parser), you can look into more feature rich libraries such as the SimpleTest Scriptable Web Browser.

    You'll want to modify the user agent string in order to simulate a request from Internet Explorer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等