Getting HTTP code in PHP using curl

后端 未结 9 2092
无人共我
无人共我 2020-11-28 03:43

I\'m using CURL to get the status of a site, if it\'s up/down or redirecting to another site. I want to get it as streamlined as possible, but it\'s not working well.

<
9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 03:58

    curl_exec is necessary. Try CURLOPT_NOBODY to not download the body. That might be faster.

提交回复
热议问题