Re: HELP! Open "HTTPS://", and follow rediect header

From: Date: Sun, 24 Mar 2002 17:02:56 +0000
Subject: Re: HELP! Open "HTTPS://", and follow rediect header
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89914@lists.php.net to get a copy of this message
Hi, Zlutarch G. wrote:
Hi All, I need help on two problems: 1) Is there a PHP function similar to fopen() that would open URL begins with "https://", i.e., SSL address? fopen("https://...") is working with current CVS but is not going to be in a release before version 4.3. For now you can use the cURL module provided the cURL library is compiled with OpenSSL support.
2) Does anyone know if it is possible in PHP to read redirect instructions in HTTP header, and then follow the links? Use the cURL module:
<?php $ch = curl_init ("http://www.php.net/"); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_NOBODY, 1); ob_start(); curl_exec ($ch); $header = ob_get_contents(); ob_end_clean(); curl_close ($ch); ?> Now search for the "Location" header in $header. Regards, Stefan Livieratos -- ICS Plus Internet Consulting + Services ============================== Aeussere Brucker Str. 51 D-91058 Erlangen Germany ============================== Tel : +49 9131 127733 Fax : +49 9131 127744 E-mail : info@icsplus.de Web : http://www.icsplus.de ==============================

« previous php.general (#89914) next »