|
Posted by Al Reynolds on 05/31/07 22:22
Morning,
I'm trying to copy a stream from mobical.net 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:
https://www.mobical.net/mobical/ics
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:
--------------------------------------------------------
<?php
if (!copy('https://user:pass@www.mobical.net/mobical/ics', '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(https://...@www.mobical.net/mobical/ics): 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:
http://www.hipcal.com/forum/viewtopic.php?pid=1180
mentions that if they attempt to download the file with
WGET it redirects once. Could that be part of the
problem?
Any ideas what I can try?
Thanks in advance,
Al Reynolds
Navigation:
[Reply to this message]
|