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 : [EMAIL PROTECTED]
Web    : http://www.icsplus.de
==============================


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to