AW: AW: [PEAR] set up a web service for file_exists
| From: | Christoph Lütjen - webEdition Software GmbH | Date: | Thu, 29 Dec 2005 12:00:21 +0000 |
| Subject: | AW: AW: [PEAR] set up a web service for file_exists | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22374@lists.php.net to get a copy of this message | ||
Hi,
documentation of HTTP_Client on http://pear.php.net says, that the
return
value of HTTP_Client::get() is the HTTP response code, if the response code
is "ok" requested file is available, if you get "not found" (numeric code of
course) file was not found.
Chris
-----Ursprüngliche Nachricht-----
Von: Jay Callicott [mailto:jrcallicott@gmail.com]
Gesendet: Freitag, 30. Dezember 2005 01:40
An: Christoph Lütjen - webEdition Software GmbH
Betreff: Re: AW: [PEAR] set up a web service for file_exists
So how would I create a script in that way, using the HTTP_Client?
Jay
On Dec 29, 2005, at 5:43 AM, Christoph Lütjen - webEdition Software
GmbH wrote:
> Hi,
>
> - you could implement this on "client" side. If a requested
> document doesn't
> exists, webservers normaly returns an error code 404 in http
> header... You
> could use HTTP_Client to do this.
>
> - What you're searching for are remote procedure calls. Commonly
> known as
> XML-RPC. Use package XML_RPC do to that.
>
> Hope that helps ;-)
> Chris
>
> -----Ursprüngliche Nachricht-----
> Von: Jay Callicott [mailto:jrcallicott@gmail.com]
> Gesendet: Freitag, 30. Dezember 2005 00:28
> An: pear-general@lists.php.net
> Betreff: [PEAR] set up a web service for file_exists
>
> This may be a dumb idea but I would like to set up a script that will
> tell remote scripts whether an image exists on a remote server. the
> function file_exists only works for local files but I need remote
> sites to be able to check this so I was thinking I'd set up a little
> web service.
>
> the function would need to do something like the following:
>
> <?php
>
> if (file_exists($_GET['file'])
> return true;
> else
> return false;
>
> ?>
>
> How can I set that up in php?. Does PEAR offer some packages for web
> services to make it easy to communicate between servers? I guess I
> could always just make it print out the answer "print true", "print
> false" and capture that output and interpret it but that's kind of a
> ghetto way of doing things.
>
> What should I do? Thanks
>
> Jay
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>