Home  >  Q&A  >  body text

How to get all link information of network in php

When we use the browser to open the URL, there are many URLs for loading resources in the network. How to use php to get the list of all URLs here. Using curl can only print out the web page code. How to solve the problem if I want to see all the transmitted URLs?

微信图片_20220520211805.png

BLUE-SKY.COM.CNBLUE-SKY.COM.CN798 days ago1217

reply all(4)I'll reply

  • 大瓶可乐@php.cn

    大瓶可乐@php.cn2022-05-23 20:35:10

    Probably not possible because your request has already been loaded on the client side, and then php can only be loaded on the server side

    reply
    0
  • BLUE-SKY.COM.CN

    BLUE-SKY.COM.CN2022-05-20 21:28:43

    That is to say, after php accesses the url, it obtains all the urls for the resources loaded by the url, which is all the connection information we usually see using network.

    reply
    0
  • 大瓶可乐@php.cn

    What do you want to do specifically? But after you curl to obtain the web page code, you can use regular expressions to match all addresses! Mainly I want to see what your needs are

    大瓶可乐@php.cn · 2022-05-23 20:36:41
    大瓶可乐@php.cn

    You can try this course https://www.php.cn/course/1099.html crawler course

    大瓶可乐@php.cn · 2022-05-23 20:44:33
  • Cancelreply