cURL,获取重定向url到一个变量 [英] cURL , get redirect url to a variable
本文介绍了cURL,获取重定向url到一个变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前使用curl来填充表单,但是在完成后,处理表单的另一个脚本重定向到其他url,现在我想获取url,脚本重定向到一个变量。
I am currently using curl to fill an form, but after completion of the post, the other script which handles the form is redirecting to other url , now I want to get the url , for which the script is redirecting to a variable.
谢谢..
推荐答案
>
You would use
curl_setopt($CURL, CURLOPT_HEADER, TRUE);
并解析 location
这篇关于cURL,获取重定向url到一个变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文