13:59 Mon Sep  3, 2007
Cheap Hummer!

12:18 Tue Jul  4, 2006
Hummer Camp After

12:15 Tue Jul  4, 2006
Hummer Camp

Help Me Humpa
PHP and MMS Server Help
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Process by email

 
Post new topic   Reply to topic    Help Me Humpa Forum Index -> MMS Pic Server by Humpa
View previous topic :: View next topic  
Author Message
bobhinkle



Joined: 13 Oct 2006
Posts: 68

PostPosted: Thu Mar 01, 2007 1:39 am    Post subject: Process by email Reply with quote

I know you offer this threw your site but wanted to see if you would tell us how you allow people to post pics threw email if their phone can't change the mmsc server.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Thu Mar 01, 2007 9:51 am    Post subject: Reply with quote

You have to get your webhost to forward the catch all email account to a script.
We could only get our webhost to forward the catch all acount to a .sh script (a shell script). So I then just put one line in the shell script pointing it to my send.php.

And in my send.php script, I have the code that php needs to open and read an email:
Code:

$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
    $email .= fread($fd, 1024);
}
fclose($fd);
Then I simply decode that $email variable and take out all the parts. One of the parts I check first is the "To" field - since it is the catchall account, it contains spam and everything else. So I make sure that the email is sent to the correct username.password or I just delete it.

And the script I use to decode that $email variable is not mine - just like the mmsdecoder.php script is not mine. I'm using one of the available mime decoder scripts out there. The one I'm using is called mimedecode.php, and is rather popular and well documented if you want to use it and need help.

BTW, I do not have this set up on humpa.com. I have it set up on www.thephonecam.com
Back to top
View user's profile Send private message
bobhinkle



Joined: 13 Oct 2006
Posts: 68

PostPosted: Tue Mar 13, 2007 8:01 am    Post subject: Reply with quote

was your system setup on plesk 8? Just trying to see if you used the mail box options to just forward the email to the script or did you have to do piping.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Mar 13, 2007 8:51 am    Post subject: Reply with quote

bobhinkle wrote:
was your system setup on plesk 8? Just trying to see if you used the mail box options to just forward the email to the script or did you have to do piping.
I don't know.
We asked the webhost if they could forward the cathchall to a script. They said they could forward it to a .sh script - and that's about it. Very Happy

EDIT: hmmmm ... I see that I already said that. Rolling Eyes
Were you asking something else?
Back to top
View user's profile Send private message
bobhinkle



Joined: 13 Oct 2006
Posts: 68

PostPosted: Thu Mar 15, 2007 4:35 pm    Post subject: Reply with quote

No i was just trying to see how you did it. Thought maybe you setup the server for the catchall.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Thu Mar 15, 2007 9:30 pm    Post subject: Reply with quote

bobhinkle wrote:
No i was just trying to see how you did it. Thought maybe you setup the server for the catchall.
Exactly. The catchall goes to my custome MMS script. My script then just deletes anything that isn't addressed to a valide username.password
Back to top
View user's profile Send private message
bobhinkle



Joined: 13 Oct 2006
Posts: 68

PostPosted: Tue Mar 20, 2007 11:21 pm    Post subject: Reply with quote

any chance i can get just the basic php script. I don't need it to check users yet. Just to be able to except an email as its input and process the information i guess. Or is it just a basic script.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Wed Mar 21, 2007 1:25 am    Post subject: Reply with quote

I just use something already written.
It is called mimedecode. I don't have the link handy, but it will be what you find if you search google for "php mimedecode".

But what would probably be far easier for you is to set up WordPress blog with the postie plugin. You don't have to use the blog itself. Just get it all setup and figure out how to get it to save the pic where you want it, then work with that. There is a rather detailed post in my forums from Phree who has already done just that.
www.humpa.com/forums/ptopic64.html

No need to reinvent the wheel, you know?

WordPress with the postie plugin is already made and ready to use. Plus it is extremely well documented. It would take me hours to get a script rewritten for you to use. And then countless hours more helping you customize it so it would actually work.
Back to top
View user's profile Send private message
Phree



Joined: 31 Dec 2005
Posts: 254
Location: South Coast, UK

PostPosted: Wed Mar 21, 2007 8:58 am    Post subject: Reply with quote

If you need any help setting up wordpress and postie, let me know...It took me a fair while to set it up (with Humpa's help) and I'm happy to help if you need any.
Back to top
View user's profile Send private message
bobhinkle



Joined: 13 Oct 2006
Posts: 68

PostPosted: Fri Mar 23, 2007 10:02 am    Post subject: Reply with quote

Thanks for the offer, i will do what i can before i start bugging you guys too much.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Help Me Humpa Forum Index -> MMS Pic Server by Humpa All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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