 |
 |
PHP: Attach and embed GD generated image
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Status:
Offline
|
|
Is there a way to attach an image generated by GD without first outputting the image to file?
Also, how does one link to the attached file from within the email body (HTML email)?
This has been racking my brain for weeks.
Aj
|
|
Austin Jackson
EducatorsHandbook.com - because great decisions are based on great data.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
To get the data for the image just use fopen/fgets on a URL to request the image from a separate script (so you would have two scripts, and actually call one from the other as if it was a browser). You can find some quick documentation on the PHP site:
http://www.php.net/mailing-lists.php
I haven't created HTML email, so don't know the linking process, but the data is undoubtedly just part of the MIME/Mulitipart stream... You might want to make sure you get the encoding right... Hope that sends you in the right direction.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Status:
Offline
|
|
Originally posted by larkost:
To get the data for the image just use fopen/fgets on a URL to request the image from a separate script (so you would have two scripts, and actually call one from the other as if it was a browser). You can find some quick documentation on the PHP site:
http://www.php.net/mailing-lists.php
I haven't created HTML email, so don't know the linking process, but the data is undoubtedly just part of the MIME/Mulitipart stream... You might want to make sure you get the encoding right... Hope that sends you in the right direction.
OK, thanks, this is actually extremely helpful. I am doing that now when I display the image in a browser, I just did not know if the fopen or fgets on the URL would read the code from the php itself or the imaged generated by the function called within it. Thanks a bunch, I will post back if/when I get it working!
Aj
|
|
Austin Jackson
EducatorsHandbook.com - because great decisions are based on great data.
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Status:
Offline
|
|
Problem solved!!! You need to use the output control functions to get it done, but it works splendidly!
Thank you for the assistance!
(Last edited by austinjackson; Dec 11, 2003 at 03:08 AM.
)
|
|
Austin Jackson
EducatorsHandbook.com - because great decisions are based on great data.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |