How to let users upload via cell phone to your site...

Discussion in 'PHP' started by boreddaily, Jul 2, 2007.

  1. #1
    I'm looking to add a feature to one of my sites that would allow users to send images from their cellular phones to my site.

    How hard is this?
     
    boreddaily, Jul 2, 2007 IP
  2. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #2
    It is done in just about the same way as a regular upload, but you have to provide some meta tag to tell the cell phone that the page is cell phone campaible. sort of like when you have to do the xml tag for rss feeds.

    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>File Upload Example</title>
      </head>
    
      <body>
        <h1>Welcome to our photo album.</h1>
    
        <form action="file_upload.php" method="post" enctype="multipart/form-data">
          <p><br/>
            Choose a photo to upload to the WAP server:
            <input name="myFile" type="file"/><br/>
            On the WAP server, save the file as: (Enter something here if you want the file to be saved in a different file name.)
            <input name="filename" type="text"/>
          </p>
    
          <hr/>
    
          <p>
            <input type="submit"/>
            <input type="reset"/>
          </p>
        </form>
      </body>
    </html>
    Code (markup):
    Make sure the phones browser is WAP 2.0+

    http://www.developershome.com/wap/wapUpload/wap_upload.asp?page=xhtmlmpEg

    .
     
    exodus, Jul 2, 2007 IP
  3. boreddaily

    boreddaily Active Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Awe, thats for a browser thing. I Should have said this before; I am trying to let them send it to sms@mysite.com and it stores to my server and database.
     
    boreddaily, Jul 3, 2007 IP
  4. bucabay

    bucabay Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Fetch the email either with POP3/IMAP etc. or catch it when it arrives, then parse the mail body for the image which will be an attachment.
    1) You will need a MIME Parser (lots of sourceforge)
    2) and ability to retrieve the email to PHP, so a POP3 or IMAP client or you can set up a forwarder that will send the email to a PHP script.
     
    bucabay, Jul 3, 2007 IP
  5. boreddaily

    boreddaily Active Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Sounds good. Is there any tutorials out there on this?
     
    boreddaily, Jul 3, 2007 IP
  6. glowdot

    glowdot Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You will need a mime decoder, as stated above, and then use procmail for the rest.

    Procmail is tough, and there are no good how-tos that I know of. Getting mine up and running was an utter nightmare.
     
    glowdot, Jul 3, 2007 IP
  7. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #7
    exodus, Jul 3, 2007 IP
    Smyrl likes this.
  8. boreddaily

    boreddaily Active Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #8
    I read those, pretty good, but they don't handle attachments.

    How does one set up a mail server on their server? Say I have my domain and I want users to be able to register

    Is that hard to do?
     
    boreddaily, Jul 3, 2007 IP
  9. mikemotorcade

    mikemotorcade Peon

    Messages:
    645
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If anyone is able to figure something out like this, I am extremely interested.
     
    mikemotorcade, Oct 19, 2007 IP
  10. boreddaily

    boreddaily Active Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #10
    anyone have an idea?
     
    boreddaily, Nov 22, 2007 IP