|
Posted by yc on 05/19/07 04:04
Hi,
I did a search of curl. It seems that my host doesn't support the
usage of curl. In this case, is there any other workaround? Am I able
to retrieve the data from this remote site and then save it to a file,
and read from it? Thanks!
yc
On May 18, 8:23 pm, Schraalhans Keukenmeester <inva...@invalid.spam>
wrote:
> At Fri, 18 May 2007 02:49:07 -0700, ycquak let his monkeys type:
>
>
>
> > Hi,
>
> > Currently I need to read contents from a dynamic page, which goes
> > something like:
> >http://servername/filename.jsp?arg1=a&arg2=b
>
> > The content is not static, neither is there a file for me to read from.
> > Thus, I would like to know how could I accomplish this task in php. I
> > saw from forums, there is a similar implementation of the RSS reader
> > which reads it in the following way:
>
> > $fileName = url;
>
> > $data = implode("", file($fileName)); ...
>
> > Will I be able to do the same thing?
>
> > I am rather new to php, so would appreciate any help rendered. Thanks!
>
> You can open a webpage using file() if your server allows opening remote
> files, but AFAIK parsing the variables like this isn't gonna work. Instead
> you probably want to use cURL to send the right http-request.
>
> Side note: implode("", file($filename)) can be replaced with
> file_get_contents($filename), which reads the file into a string directly.
>
> Sh.
Navigation:
[Reply to this message]
|