php - cURL 'malformed url' -
After the
this URL
''
Browser but perfectly good in cURL
Any ideas on a work around
Edit:.
cURL code:
function get_web_page ($ url) {$ option = array (true CURLOPT_RETURNTRANSFER = & gt; true, // return web page CURLOPT_HEADER = & gt; false, // do not return header CURLOPT_FOLLOWLOCATION = & gt; true, // follow redirects CURLOPT_ENCODING = & gt, "", // CURLOPT_USERAGENT all encoding handle = & gt; "Spider", // Who I CURLOPT_AUTOREFERER = & gt ; stop after 120, // connect timeout on CURLOPT_TIMEOUT = & gt; true, // redirect CURLOPT_CONNECTTIMEOUT = & referenced set Gt 120, // timeout response CURLOPT_MAXREDIRS = & gt; 10, // 10 redirects); $ Ch = curl_init ($ url); Curl_setopt_array ($ ch, $ option); $ Content = curl_exec ($ ch); $ Err = curl_errno ($ ch); $ Errmsg = curl_error ($ ch); $ Header = curl_getinfo ($ ch); Curl_close ($ ch); If ($ $ Errmsg == '') {Dead ($ mistake. ':' $ Errmsg);} $ Content Return;
I get the output of the page when it's turned on
curl http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=39726387
it also works for me:
$ ch = curl_init ('http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=39726387'); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); $ Out = curl_x $ ($ CH); Curl_close ($ ch); Echo per dollar; In
Edit: Just tried to post your code and it works fine for me probably the string passed to get_web_page ()
he That's wrong?
Comments
Post a Comment