spyworld Posted December 17, 2012 Share Posted December 17, 2012 (edited) Browser result is different than php curl output. How to fix it? http://kat.ph/applications/?rss=1 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://kat.ph/applications/?rss=1"); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/rss+xml; charset=ISO-8859-1", "Content-length: ")); $result = curl_exec($ch); curl_close($ch); echo $result; Edited December 17, 2012 by spyworld Quote Link to comment https://forums.phpfreaks.com/topic/272090-curl-problem/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.