Re: Webcal and file_get_contents

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

 



On 6 Dec 2011, at 10:57, Davo Smith wrote:

> Does anyone know if there is a simple way to convince
> 'file_get_contents' to treat webcal urls (e.g.
> webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics ) as
> being the same as an http url? (according to Wikipedia, http is
> assumed for webcal urls)
> 
> I've looked into using 'stream_wrapper_register', but, unless I've
> misunderstood it, this would require me to write the whole http access
> myself, without being able to just pass it onto the internal http
> processing code.
> 
> I've done some web searching, looked through the PHP docs and had a
> look through the archives here, but not managed to find anything
> (sorry if I've missed anything obvious).


$url = str_ireplace('webcal://', 'http://', $url);

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux