note 25896 added to ref.curl

From: Date: Thu, 10 Oct 2002 12:23:02 +0000
Subject: note 25896 added to ref.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-37887@lists.php.net to get a copy of this message
I wanted to import an https Web pages thanks to fopen("https://xxx", "r") or fsockopen but as far as I read, it was only possible with cURL extension (to get these functions worked with https, we have to wait the PHP 4.3 release, TBC) , so I installed it and it worked. It is quite easy, but I spend to much time on it: First of all, here is the most important: WE DON'T NEED to compile anything to get curl worked. All the extensions that we need are already in the PHP 4.2.3 zip. So here are the instructions and links to get Apache + PHP + CURL work properly: Downloads: => Apache Web server with Openssl included: http://www.modssl.org/contrib/ftp/contrib/ Apache_1.3.26-Mod_SSL_2.8.9-OpenSSL_0.9.6d-WIN32.zip => PHP 4.2.3 for Windows: http://www.php.net/get_download.php?df=php-4.2.3-Win32.zip => Optional: Openssl zip to get libeay32.dll and ssleay32.dll (I didn't need them because I used those stored in PHP zip) http://www.modssl.org/contrib/ftp/contrib/ OpenSSL-0.9.6d-win32_RAR3_Archive_.rar Installs: => Unzip Apache in Program Files folder(there should be no problem with the blank in the path): => Follow those instructions: http://tud.at/programm/apache-ssl-win32-howto.php3 . I didn't exactly do what they wrote but it helped a lot. I created the test certificat thanks to this link in order to test my Apache server with SSL. => Configure httpd (easy to find on the Web) and test Apache before going on, it avoids problems. I just changed the Port from 80 (http) to 443 (https) in httpd, I only wanted to perform https. I didn't try to get the both working together. => Unzip PHP in C:\Php path (don't install it in Program Files folder, you would have troubles because of the blank this time...) => Configure PHP : http://www.php.net/manual/en/install.windows.php #install.windows.manual WARNING: php.ini MUST be stored into the c:\winnt folder and the dlls must be stored into the c:\winnt\system32 folder. => Test it with Apache and phpinfo() function. cURL: To add cURL extension, YOU DON'T NEED to compile anything. All the extensions that you need are in the C:\php\extensions folder. To add cURL or any other extensions: => Have the libeay32.dll and ssleay32.dll in the system32 folder (already done if you installed PHP) => Copy all dlls from php/dll/ folder to winnt/system32/ (libeay32.dll and ssleay32.dll are already there if you followed the previous steps) => Remove the ";" in front of extension=php_curl.dll in php.ini. Those instructions come from: http://www.php.net/manual/en/install.windows.php #install.windows.extensions And it should work, just test it with curl functions into your php script. -- http://www.php.net/manual/en/ref.curl.php http://master.php.net/manage/user-notes.php?action=edit+25896 http://master.php.net/manage/user-notes.php?action=delete+25896 http://master.php.net/manage/user-notes.php?action=reject+25896

« previous php.notes (#37887) next »