Dom*_*ger 15
是的,但是您必须通过解析响应并查找看起来像的内容来自己完成:
<meta http-equiv="refresh" content="5;url=http://example.com/" />
Run Code Online (Sandbox Code Playgroud)
服从<meta>刷新请求是浏览器方面的事情.使用DOM解析<meta>在cURL给出的响应中查找具有适当属性的标记.
如果您可以保证响应是有效的XML,您可以执行以下操作:
$xml = simplexml_load_file($cURLResponse);
$result = $xml->xpath("//meta[@http-equiv='refresh']");
// Process the $result element to get the relevant bit out of the content attribute
Run Code Online (Sandbox Code Playgroud)