Page 1 of 3

Mobile phone picture on to website

Posted: Wed Aug 24, 2005 4:52 am
by Wardy7
Hi there everyone, hope you are all OK?!
I'm after abit of help if anyone is able to...

I'm after knowing if anyone knows of a way to make it so users can send a picture they have taken on their mobile phone and send it to the site so it can be displayed on it.
I'm unsure how it can be done although I'm guessing thata script that can check emails to see if there is one with an attachment and then pull the picture from it is goign to be part of the process?
The picture (MMS) is going to have to be sent from the mobile to a specified email address and then script run say every hour to be taken to databse and then to site.

This is too complicated for me to do so if anyone can help or point me in the right direction I'd be very gratefull!

Ccheers
Wardy

Posted: Wed Aug 24, 2005 5:00 am
by shiznatix
for the email stuff i think php mailer can do that for you
http://phpmailer.sourceforge.net/

then it would be simple to use getimagesize(); to make sure that the attachment is a picture then copy() that to a folder on your website then just run a quick query to update your table with the path to the new image and whatever else.

use a cron job for linux or scheduled task for windows to get this script to run once every hour or whatnot.

all in all this sounds like a really cool project - good luck

Posted: Wed Aug 24, 2005 5:00 am
by JayBird
Im was looking to do this a few months ago, but didn't really find anything for my needs. Only paid services did what i wanted

Posted: Wed Aug 24, 2005 5:05 am
by Wardy7
Wow guys, how quick for the replys there?! :D

Will take a look at the site you sent and see what I can find, and also take a look at sorting out the getimages and that sort of stuff too :)

Cheers
Wardy

Posted: Wed Aug 24, 2005 5:06 am
by Grim...
Flickr take emails from mobiles and displays them on site, so it is possible.

Posted: Wed Aug 24, 2005 5:07 am
by shiznatix
it does not sound like it would be too hard, the hardest part would be opening emails and checking for a attachment wouldnt it?

Posted: Wed Aug 24, 2005 5:54 am
by Grim...
Yeah, I'm intrigued by this, and working on it right now.

Getting POP3 emails is a bitch :(

Posted: Wed Aug 24, 2005 5:55 am
by onion2k
Note: MMS phones save pictures with a header in front of the JPG info that GD quite often complains about.

Posted: Wed Aug 24, 2005 6:58 am
by Grim...
This page should help you out lots:
http://www.linuxscope.net/articles/mail ... tsPHP.html

Posted: Wed Aug 24, 2005 6:59 am
by Grim...
Oh, and $username isn't your 'username', it's your whole email address.

Posted: Wed Aug 24, 2005 7:04 am
by Wardy7
Jee wizz, I never expected so much help in so little time. Amazing guys, thanks! :D

Grim...I'm lookign through that now, ta :)

Cheers
Wardy

Posted: Wed Aug 24, 2005 7:09 am
by m3mn0n
Grim... wrote:Yeah, I'm intrigued by this, and working on it right now.

Getting POP3 emails is a bitch :(
No it's not. I have a POP3 email checker that is under 25 lines.

Posted: Wed Aug 24, 2005 7:34 am
by Chris Corbyn
Sami wrote:
Grim... wrote:Yeah, I'm intrigued by this, and working on it right now.

Getting POP3 emails is a bitch :(
No it's not. I have a POP3 email checker that is under 25 lines.
Yep, there are a whole host of functions built into PHP for this.... The IMAP functions will works with POP3 and IMAP4 ;)

Posted: Wed Aug 24, 2005 7:38 am
by Grim...
Yeah, I hit refresh on my script right after I posted that and 'ping' :)

I've now finished my script, basically it takes an email from a user with an image attached, resizes and saves the image, takes the subject as the images title and the body as the images description.

Awesome ;)

Posted: Wed Aug 24, 2005 8:20 am
by Wardy7
Grim... wrote:Yeah, I hit refresh on my script right after I posted that and 'ping' :)

I've now finished my script, basically it takes an email from a user with an image attached, resizes and saves the image, takes the subject as the images title and the body as the images description.

Awesome ;)
You've just done all of that Grim?
Does it work with webmail based programs too?

By any chance would you mind sharing it or I could pay you for it if you like?

Cheers
Wardy