You are here: What should I do if fopen is restricted? « PHP Programming Language « IT news, forums, messages
What should I do if fopen is restricted?

Posted by typingcat on 10/25/05 06:04

fopen worked fine but not on my hosting service.
Warning: fopen(): URL file-access is disabled in the server
configuration...
Nor curl worked. I think it's not installed the server.

Is there any other way to access URL file in PHP?

Ramon wrote:
> My apologies, I missunderstood.
>
> But fopen should still work: *fopen -- Opens file or URL*
>
> Have a read of the fopen documentation entry.
>
>
>
>
> typingcat@gmail.com wrote:
> > The web page I'm trying to read is not on the same server. Does fopen
> > also work for this? Can I read www.microsoft.com with fopen?
> >
> > Ramon wrote:
> >
> >>I think if you go to http://www.php.net/documentation
> >>
> >>You will find that in the documentation there is an entire section
> >>dedicated to Filesystem. With many different functions that you may find
> >>useful: eg. fread, fopep anbd many more.
> >>
> >>
> >>
> >>typingcat@gmail.com wrote:
> >>
> >>>Is it possible to read another web page in PHP?
> >>>If is ASP.NET, the code would be
> >>>------------
> >>>WebRequest req=WebRequest.Create("http://www.microsoft.com");
> >>>WebResponse res=req.GetResponse();
> >>>StreamReader sr = new StreamReader(res.GetResponseStream());
> >>>String Output=sr.ReadToEnd();
> >>>Response.Write("The content is : " + Output);
> >>>--------
> >>>
> >>>Would you please tell me the PHP equivalant of this code? Thank you.
> >>>
> >
> >

 

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

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