Re: file and https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



on 2/21/03 9:52 AM, Ryan Jameson (USA) at RJameson@usa.ibs.org appended the
following bits to my mbox:

> Has anyone found a way to import data through ssl into a php script? If I can
> pull xml formatted data through a secure socket it will save some major
> headaches with a problem I need to solve.
> 
> $url = file("https://www.mydomain.com";); Would be ideal, but it does not
> work....


Not really related to databases so it should be on PHP-General.  That
said...


To work with HTTPS, you typically need to use the CURL library functions:

<http://www.php.net/manual/en/ref.curl.php>

I think in your case, specifically use:

<http://www.php.net/manual/en/function.curl-exec.php>

If I recall correctly, PHP 4.3 began bundling https support into its fopen
wrappers so if you upgrade, you can use https directly in fopen calls (not
sure if it works with "file")

If you don't want to recompile with CURL support, nor want to upgrade to PHP
4.3.x, you may be able to call a command line utility directly.  For
example, I've used this in the past:


passthru('curl https://secure.example.com/some-file.html');


Hope that helps.

Sincerely,

Paul Burney
<http://paulburney.com/>

<?php
    while ($self != "asleep") {
        $sheep_count++;
    }
?>




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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux