cURL , get redirect url to a variable

前端 未结 4 1194
一整个雨季
一整个雨季 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:07

    You may want to set the CURLOPT_FOLLOWLOCATION to true.

    Or set the CURLOPT_HEADER to true and then use regexp to get the Location header.

提交回复
热议问题