Re: Send postcard link
| From: | Torgny Bjers | Date: | Mon, 10 Oct 2005 05:14:16 +0000 |
| Subject: | Re: Send postcard link | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223803@lists.php.net to get a copy of this message | ||
Roger Thomas wrote:
>On server-1 I have my photogallery working. On another box, server-2, I have my postcard script
>also working great. Users can send postcards using ready inhouse designs or upload their own (max
>100K). Both have been serving our community for the past 2 years or so.
>
>Current requirement:
>
>When I browsed my photogallery, I would like to have a button that says 'Send this picture
>as postcard'. Behind the scenes, how do I send that picture to server-2 postcard script?
>
>
>
The easiest way would probably be to use file_get_contents, which is
binary safe. The file_get_contents function supports opening remote
files if allow_url_fopen is activated.
An example:
$handle = fopen("ftp://user:password@example.com/somefile.txt",
"r");
Regards,
Torgny