cURL , get redirect url to a variable

前端 未结 4 1192
一整个雨季
一整个雨季 2020-11-27 17:50

I\'m using curl to fill a form. After completion of the post the other script which handles the form is redirecting to another URL. I want to get this redirect URL into a va

4条回答
  •  囚心锁ツ
    2020-11-27 18:02

    You would use

    curl_setopt($CURL, CURLOPT_HEADER, TRUE);
    

    And parse the headers for the location header

提交回复
热议问题