Search

Пользовательский поиск

Install Curl

Install Curl in PHP5 and Apache on UBUNTU 10.10


1. Open your terminal (ctrl+t) and type: 
 sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt
 
2. Open the php.ini file (/etc/php5/apache2/php.ini ) and add: 
extension=curl.so 
 
3. Restart apache: 
service apache2 restart




       Php Code       $ch = curl_init();
        curl_setopt ($ch, CURLOPT_URL, $this->postURL);
        curl_setopt ($ch, CURLOPT_HEADER, 0);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_POST, 1);
        curl_setopt ($ch, CURLOPT_POSTFIELDS, $qString);
        $result = curl_exec ($ch);
        curl_close ($ch);