|
Author |
Message |
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Tue Feb 05, 2002 3:24 pm (22 years, 2 months ago) |
|
I want users of my site to be able to send me a JPEG image via email using an online form.
All the examples I find are either too simple and don't deal with attachments or are far to complicated for my level of PHP knowledge.
Can anyone provide me with a piece of code to do this? (or failing that a link to an easy to follow tutorial).
Also,
On some of the examples I have been trying I have received a warning that SAFE MODE Restriction is in effect. This may just be mistakes in the code. I have F2S webspace (paid for). Does anyone know of any restrictions F2S has that wont allow me to do this.
Thanks in advance,
Darren |
|
|
|
|
Garth Farley
WebHelper
Joined: 08 Jan 2002
Posts: 69
Location: Ireland
|
Posted:
Tue Feb 05, 2002 4:02 pm (22 years, 2 months ago) |
|
Yes what you want is possible (I came across something similar in a tutorial on either www.hotscripts.com - upload scripts it's under). This form will cause the browser to upload their JPEGs to your server, which then you can send to yourself.
F2S does have the SAFE MODE restriction, but you can get around it by using your directory as the temporary storage place for the uploaded file (non-safe mode uses the /tmp directory on the server).
Beware of people sending you huge images though.
Garth Farley |
|
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Tue Feb 05, 2002 4:31 pm (22 years, 2 months ago) |
|
Thanks Garth,
Does that mean there is no way to email a file directly from users machine? As you say large file sizes would be an issue, although presumably file size can be limited.
I checked out Hotscripts.com and although I think I found the scripts you referred to I cant seem to download anything but a file called 'dload.cgi' which just contains nonsense. I will try later from a PC it may be a Mac thing!!
Darren |
|
|
|
|
Peter
Team Member
Joined: 09 Jan 2002
Posts: 147
Location: UK
|
Posted:
Tue Feb 05, 2002 8:06 pm (22 years, 2 months ago) |
|
darren wrote: |
Does that mean there is no way to email a file directly from users machine? As you say large file sizes would be an issue, although presumably file size can be limited. |
You cannot send a file from a users machine without uploading it to the web server and then sending it. Can't you just gt them to send it as an email attachment?
File size can be limited. There's a good bit in the PHP manual about this. |
________________________________ Maple Design - quality web design and custom programming |
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Wed Feb 06, 2002 8:34 am (22 years, 2 months ago) |
|
The image upload is to be part of a form collecting other data, so it would be nice if it were all done together, rather than it be sent as a normal attachment. Although its looking to be more complicated than I had hoped so I may have to settle for this in the end.
My main problem now is getting around the SAFE MODE problem of not being able to upload to the temp directly. All of the turorials I've seen so far assume you have access to this and can upload to it and then copy from it to your own space. I did find a reference on the old F2S Users site to use the PHP CGI engine, would this work?
Or can I use my directory as the temp directory, as Garth suggests - I can find no mention of how to specify this, any clues?
Thanks again,
Darren |
|
|
|
|
szo2
Junior WebHelper
Joined: 10 Jan 2002
Posts: 18
Location: Hong Kong
|
Posted:
Sat Mar 02, 2002 5:56 pm (22 years, 1 month ago) |
|
Although I oppose against hosting with F2S I still think I should help their users.............
AFAIK, Both solutions will work.
For the CGI PHP in F2S, you have to use .cgi as your file extension instead of .php, AND add a line on the top of the script(s):
#!/usr/bin/php |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.135515 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |