CURLOPT_GET curl_setopt – PHP Warning

by KishPress on July 23, 2011

I was using this function on my Twitter plugin and it was working fine on most of the hosts, but recently when I changed my hosting, I started getting this errorIn fact, the curl_setopt function does not have anything like CURLOPT_GET – SourceMy Function

function kish_twitter_bitly_shorturl( $url ){$url = 'http://api.bit.ly/v3/shorten?login=asdsdfsfokdsfans&apiKey=dddddddxddd&longUrl='.$url.'&format=json&history=1';if(function_exists('curl_init')) {$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//curl_setopt($ch, CURLOPT_GET, true);$shorturl=curl_exec($ch);$Headers = curl_getinfo($ch);curl_close($ch);if($Headers['http_code'] == 200) {return json_decode($shorturl);}else{echo "error";}//Check Response}else {echo "Curl Lib not installed";}//CURL Library installed}

I just commented that and the error went off.

Related posts:

  1. How to extract YouTube Thumb Image URL from a YouTube Video URL using PHP Script If you have thumbnails for your blog theme and you...
  2. How to save E-Junkie Transactions and manage users using a WordPress Blog ? There are many of us who use E-Junkie to sell...
  3. WordPress 3.2 Released – Is your PHP Version Compatible WordPress has released version 3.2 which is a major update,...

Leave a Comment

Previous post:

Next post: