By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

Can't copy() stream from https site

P: n/a

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('https://user:pa**', '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
May 31 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.