我正在使用以下代码:
$agent= 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0';
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_URL, "www.example.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
echo $output;
Run Code Online (Sandbox Code Playgroud)
但它重定向到这样:
http://localhost/aide.do?sht=_aide_cookies_
Run Code Online (Sandbox Code Playgroud)
而不是URL页面.
有人可以帮我解决我的问题吗?
我有一个网站,我想在没有登录的情况下将视频上传到YouTube.可能吗?如果是,怎么办呢?