Re: =.jpg from another URL with PHP=
| From: | Anthony Ritter | Date: | Sat, 12 Oct 2002 04:55:43 +0000 |
| Subject: | Re: =.jpg from another URL with PHP= | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119715@lists.php.net to get a copy of this message | ||
John,
Thank you.
Such as this?
......................................
<HTML>
<HEAD>
<BODY>
This is a test.
<BR>
<IMG SRC="http://localhost/Map.php">
</BODY>
</HTML>
..........................................
The output now has both the map and the text.
However - being a novice - I'm not sure of:
> 1. You're not sending an image/jpg header() in your image file. The
> browser won't know what kind of data it's receiving.
and
> 3. Why not just set a *cron* script to run a program to copy the image to
> your machine every X minutes. Then you can just reference it like any
> other image. With the setup you have now, you're going to be using a lot
> more resources because the PHP script will have to go and read that URL
> and make the image with every request.
..........................
Many thanks for your time,
TR
..........................
John W. Holmes wrote in message
> Two things:
>
> 1. You're not sending an image/jpg header() in your image file. The
> browser won't know what kind of data it's receiving.
>
> 2. You need to reference your image in the <img> tag through a web
> server, that way the PHP code is parsed. <img
> src=http://www.yourdomain.com/make_image.php> or even just a
> relative
> URL to the file
> <img src="images/make_image.php">
>
> okay, one more:
>
> 3. Why not just set a cron script to run a program to copy the image to
> your machine every X minutes. Then you can just reference it like any
> other image. With the setup you have now, you're going to be using a lot
> more resources because the PHP script will have to go and read that URL
> and make the image with every request.
>
> and one more, just because:
>
> 4. I hope you're not violating any copyrights.
>
> ---John Holmes...