Page 1 of 1

Getting contents of modified Image.php

Posted: Sat Jun 02, 2007 10:37 am
by violet
I just realized I was posting in the wrong section of the forums...oops. Hehe :D (Not to say that the people in the other section weren't helpful, because they were..)

OK. So. Values (text) are passed on to my Image.php using a Form with method=GET.

This way the URL becomes Image.php?Var1=Value1&Var2=Value2&Var3=Value3 & so on

How do I get the contents of my modified Image.php?

Because when I refer to my Image.php as simply Image.php it gets the basic ("initial") values of Var1 & Var2 & Var3 and not the values passed on to it using the form with method=GET.

The particular function I am using in my SendMail.php, require(), won't accept Image.php?Var1=Value1&Var2=Value2&Var3=Value3 & include doesn't recognize Image.php as an image at all (for some weird reason).

If there's perhaps another way of doing this whole shebang pls. recommend/suggest it.

Thanks :)

Posted: Sat Jun 02, 2007 2:59 pm
by onion2k
Personally, I'd make the code that generates the image into a function (or an object) that returns the image data, and then just call it like any other function. Trying to fetch the output of a script is possible (using cURL for example) but it'll be much slower than keeping everything within PHP.

Posted: Tue Jun 19, 2007 10:01 am
by violet
Is there any other way to modify/pass values on to Image.php other than using a form with a get method?

I'm going in circles because it seems a form with a Get method is the only way to pass values on to Image.php and using require() is the only sure way to send the PHP image to an email address as an attachment (however require() won't accept anything like Image.php?Var1=Value1&Var2=Value2&Var3=Value3)

Posted: Tue Jun 19, 2007 10:35 am
by superdezign
Is Image.php an image itself? I think you could just use it as an image file.

Code: Select all

<img src="Image.php?var1=1&var2=2&var3=3" />

Posted: Wed Jun 20, 2007 5:09 am
by violet
Hello again superdezign!!!! :D

Do I insert that under this part?

$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"

Or under the attachments part?

$message .= "Content-Type: image/gif; name=\"XYZ.gif\"\r\n"

Posted: Wed Jun 20, 2007 6:31 am
by superdezign
No idea what you're asking. I'm saying that if the PHP is treated as it's own image (with image header's and all) it can be used anywhere else as an image.

Posted: Thu Jun 21, 2007 7:11 am
by violet
Ah, well I thought maybe I could simply add image.php as an attachment that way. I do think attaching it this way..with the img src tag, will allow the extensions

Code: Select all

image.php?var1=1&var2=2&var3=3
to be included :D Thanks