curl: 301 永久移动,浏览器查看页面
curl: 301 moved pernamently, browser see page
我对 c 有问题url
curl http://store.ebizmarts.com/media/feeds/Ebizmarts_MageMonkey.xml
this or any other url return 301. 相同的 urls 在浏览器中工作正常。
php5.5
curl --version
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
我不知道应该去哪里寻找解决办法。
感谢抽空!
如果你想跟随重定向,你需要为 curl 提供 -L
选项。
curl -L http://store.ebizmarts.com/media/feeds/Ebizmarts_MageMonkey.xml
在php中:
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
我对 c 有问题url
curl http://store.ebizmarts.com/media/feeds/Ebizmarts_MageMonkey.xml
this or any other url return 301. 相同的 urls 在浏览器中工作正常。
php5.5
curl --version
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
我不知道应该去哪里寻找解决办法。
感谢抽空!
如果你想跟随重定向,你需要为 curl 提供 -L
选项。
curl -L http://store.ebizmarts.com/media/feeds/Ebizmarts_MageMonkey.xml
在php中:
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);