PHP get_headers() alternative

后端 未结 3 2037
走了就别回头了
走了就别回头了 2020-12-28 10:46

I need a PHP script that reads the HTTP response code for each URL request.

something like

$headers = get_headers($theURL);
return substr($headers         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-28 11:16

    You can build and read your own HTTP queries with fsockopen and regular file operations. Check out my earlier answer on this topic:

    Are there any other options for rest clients besides CURL?

提交回复
热议问题