Can't copy() stream from https site

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm trying to copy a stream from to a local
file (for those of you who don't know, Mobical is a free
online SyncML server, but they don't officially offer
iCalendar support).  Unofficially, you can go to:
and enter your Mobical username and password
(HTTP authentication).  It then begins a download of
your current calendar etc. as an iCalendar stream.

I tried:
    if (!copy('', 'test.ics'))  
        print ("failed to copy file...<br>\n");
but I get the following output:
Warning: copy(): HTTP request failed! HTTP/1.1 401 Unauthorized in  
/var/www/testcopy.php on line 3
Warning: copy( failed to open  
stream: Success in /var/www/testcopy.php on line 3
failed to copy file...

If I try to copy a static HTML page from an HTTP
server it works fine, but not with the HTTPS stream.

Someone here:
mentions that if they attempt to download the file with
WGET it redirects once.  Could that be part of the

Any ideas what I can try?

Thanks in advance,
Al Reynolds  

Site Timeline