php - Can curl HTTPS but not HTTP -
i can do:
curl https://feinternational.com/buy-a-website/9671-affiliate-e-commerce-survival-and-emergency-preparedness-34k-gross-mo but not:
curl http://feinternational.com/buy-a-website/9671-affiliate-e-commerce-survival-and-emergency-preparedness-34k-gross-mo the difference http , https. why that? how can make curl follow redirect https without me have modify url manually? curlopt_followlocation => true, doesn't work.
curl not follow redirect without -l option. looks website link shared has kind of rewritrule rewrite http pages https , hence not found error when curl.
if there no rewriterule http, able curl url.
if want use http https site, can use
curl -l "http://feinternational.com/buy-a-website/9671-affiliate-e-commerce-survival-and-emergency-preparedness-34k-gross-mo" -l follows redirect.
alternatively can write in php:
curl_setopt($ch, curlopt_followlocation, true); where $ch = curl_init();
Comments
Post a Comment