php - pecl install pecl_http not working. -


i have installed http extension php using following command,

**pecl install pecl_http** 

its successfull, cannot find http.so extension in /usr/lib/php5/20121212+lfs folder. there have do?

i ve acheived http posting using following function. found in internet.

function http_post_lite($url, $data, $headers=null) {

$data = http_build_query($data);     $opts = array('http' => array('method' => 'post', 'content' => $data,'header' => "content-type: application/x-www-form-urlencoded\r\n"));   if($headers) {     $opts['http']['header'] = $headers; } $st = stream_context_create($opts); $fp = fopen($url, 'rb', false, $st);  if(!$fp) {     return false; } return stream_get_contents($fp); } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -