You are here: Can't copy() stream from https site « PHP Programming Language « IT news, forums, messages
Can't copy() stream from https site

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация