eSense Page Implementation Problem
Posted by Nishanth in web development on February 12th, 2009
I had a strange error while programming which spoiled lot of my time. I was trying to fetch a content from an URL through cURL .
The content I am trying to fetch was from server Microsoft-IIS/6.0 powered by ASP.NET. The error I am getting was “eSense Page Implementation Problem Error: Disabled Cookies”. I tried different methods like file_get_contents() but still not worked.
Finally I solved the issue by setting user agent for request header. Below is my working code
$url="http://www.dfm.ae/pages/default.aspx?c=2000&q0=ajmanbank"; $ch = curl_init(); $header[]="User-Agent: Mozilla/5.0"; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_USERAGENT, ''); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); echo $response = curl_exec($ch); curl_close($ch);
Hope this may help someone else
We Bring Ideas or Web Ring Ideas - What do you think?
Greetings Techies
This is Nishanth Krishnan . Finally I set my mind to move my blog to own domain - webringideas.com.
Let me blah blah about me.I am from Kerala(Gods own country).I am a web developer.I am part Flip Media development team since June 2005.
I am dedicating this blog to help, motivate and share the new techniques, tricks and tips which I come across in my daily profession life - no matter how good or bad, right or wrong! I am targeting to build or be a part of an online community where web developers will share their ideas and knowledge.
Well, my colleagues in Flip Media Trivandrum raised a concern about my domain webringideas.com. Is it We Bring Ideas or Web Ring Ideas. I am leaving this concern to the readers to conclude.
And finally .. I wont be maintaining my old blog which I never did :). All the old junk content is still there :).The blog is still up and running. No plan to shut down for the time being
Readers, watch on this space!
Nishanth Krishnan