Welcome to Developer's Home Thursday, July 29, 2010
Home - DevelopersHome.com
Home Preferences
Mobile Internet Browsing (WAP) WAP Server Setup Tutorial Quick Links: Introduction How to Publish WAP 1.x / WAP 2.0 Content WAP 1.x / WAP 2.0 MIME Types and File Extensions Setting up MIME Types on WAP Servers Setting MIME Types with a htaccess File Setting MIME Types with Server-side Technologies Setting up Default Documents
WML Tutorial Quick Links: WML Introduction WML Deck and Card Font Size and Style WML Images WML Tables WML Anchor Links Programming Softkeys of Mobile Phones WML Template and Menu WML Events WML Selection Lists WML Input Fields WML Variables Submit Form Data Clear Saved Forms
WMLScript Tutorial Quick Links: WMLScript Introduction Compiling WMLScript Code WMLScript Language Rules Defining Functions Calling Functions WMLScript Variables WMLScript Variables Vs WML Variables Passing Arguments By Value and By Reference WMLScript Operators WMLScript Conditional WMLScript Looping WMLScript Standard Libraries WMLScript Arrays Validate Form Data
WMLScript Standard Libraries Reference Quick Links: WMLBrowser Library Dialogs Library String Library Float Library Lang Library URL Library
XHTML MP Tutorial Quick Links: XHTML MP Introduction Development of Wireless Markup Languages Advantages of XHTML MP WML Features Lost in XHTML MP Syntax Rules of XHTML MP XHTML MP MIME Types and File Extension XHTML MP Document Structure XHTML MP Generic Metadata XHTML MP Images XHTML MP Anchor Links XHTML MP Selection Lists XHTML MP Input Elements Submit Form Data
WAP CSS / WCSS Tutorial Quick Links: WCSS Introduction Syntax Rules of WCSS How to Apply Cascading Style Sheets to Documents WCSS Selectors Div and Span Elements Cascading Rules WCSS Font/Text Properties WCSS List Properties WCSS Color Properties WCSS Border Properties WCSS Access Key Extension WCSS Input Extension WCSS Marquee Extension Matching Style Sheets to Different User Agents
Detect User Agent Types and Device Capabilities Quick Links: Introduction The Accept Header The User-Agent Header The Accept-Charset Header The Accept-Language Header The x-wap-profile and Profile Headers How to Read the Value of an HTTP Header How to Use UAProf (User Agent Profile)
UAProf / User Agent Profile Reference Quick Links: HardwarePlatform Component SoftwarePlatform Component NetworkCharacteristics Component BrowserUA Component WapCharacteristics Component PushCharacteristics Component MmsCharacteristics Component
Upload Files From WAP Cell Phones Quick Links: How to Upload Files from WAP Cell Phones XHTML MP Example Handling File Uploads with PHP Handling File Uploads with JSP / Java Servlet Security Considerations of File Upload
Sample Book Chapters Adapting to User Devices Quick Links: Introduction to Adaptation of Mobile Sites Using WALL in Mobile Sites Using WURFL for Detecting Devices and Capabilites Other Open Source Tools for Adaptation
Mobile Messaging SMS Tutorial Quick Links: Introduction to SMS What Makes SMS Messaging So Successful Example SMS Applications SMS Center / SMSC Basic Concepts of SMS Intra-operator SMS Inter-operator SMS International SMS SMS Gateway How to Send SMS Messages from Computers How to Receive SMS Messages with Computers Introduction to GSM / GPRS Wireless Modems How to Use HyperTerminal Introduction to AT Commands General Syntax of Extended AT Commands Result Codes of AT Commands AT Command Operations: Test, Set, Read, Execution Checking if the Use of AT Commands to Send, Receive and Read SMS Messages is Supported Operating Mode: SMS Text Mode and SMS PDU Mode Setting/Reading the SMSC Address (AT+CSCA) Preferred Message Storage (AT+CPMS) Writing SMS Messages to Message Storage (AT+CMGW) Deleting SMS Messages from Message Storage (AT+CMGD) Sending SMS Messages from a Computer / PC (AT+CMGS, AT+CMSS) Reading SMS Messages from Message Storage (AT+CMGR, AT+CMGL) How to Choose an SMS Gateway Provider Comparison Table of SMS Gateway Providers Free SMS Software/Tools and Libraries GSM 7-bit Default Alphabet Table (with ISO 8859-1) SMS on Windows PC (Non-Developers) SMS on Linux PC (Non-Developers)

Tutorial about Uploading Files from WAP Cell Phones



Preferences - Do not show ads

Today cell phones are becoming more and more powerful. Many of them can be used as a digital camera for taking pictures and recording video clips. With a cell phone that supports file upload, you can upload some pictures or video clips to a server, thus saving storage space of your cell phone. In this tutorial, we will provide you information about building a mobile Internet application that accepts file uploads from WAP-enabled cell phones.

We will begin the tutorial with an overview of how to upload files from a WAP cell phone. Then we will provide you an XHTML MP file upload example that works on both mobile browsers and web browsers like IE and Firefox.

At the server-side, a server-side technology is required to handle the HTTP request submitted from the client. ASP / ASP.NET, Java Servlet, JSP, Perl and PHP are some examples of commonly used server-side technologies. In this tutorial, we will cover how to use PHP and Java Servlet / JSP to handle file uploads. The techniques can be applied to both WAP and web applications.

At the end of the tutorial, we will discuss some of the security issues that you should pay attention to.


Table of Contents

Upload File from WAP Cell Phone

Overview

How to Upload Files from WAP Cell Phones

Nokia Cell Phones that Support WAP Upload

XHTML MP Example Demonstrating File Upload

Handling Form-based File Upload with PHP

Parsing Form Data and Getting Information about the Uploaded File with PHP

PHP Directives Related to (Large) File Upload

Checking for Errors

UPLOAD_ERR_INI_SIZE Error Code

UPLOAD_ERR_FORM_SIZE Error Code (Use with the MAX_FILE_SIZE Form Field)

UPLOAD_ERR_PARTIAL Error Code

UPLOAD_ERR_NO_FILE Error Code

UPLOAD_ERR_NO_TMP_DIR Error Code

UPLOAD_ERR_CANT_WRITE Error Code

Saving Uploaded Files on the File System with PHP (move_uploaded_file() Function)

Processing Contents of Uploaded Files with PHP

Retrieving Values of Ordinary Form Fields with PHP

Example PHP File Upload Script

Handling Form-based File Upload with Java Servlet or JSP

Downloading the Apache Jakarta Commons FileUpload and Commons IO Libraries

Installing Apache Jakarta Commons FileUpload and Commons IO into a Servlet/JSP Container Like Tomcat

Checking If an HTTP Request is Encoded in Multipart Format

Parsing Form Data with Java Servlet / JSP

Iterating through File Items

Retrieving Values of Ordinary Form Fields with Java Servlet / JSP

Getting Information about the Uploaded File with Java Servlet / JSP

Saving Uploaded Files in the File System with Java Servlet / JSP

Processing Contents of Uploaded Files with Java Servlet / JSP

Example JSP File Upload Script

Security Considerations of File Upload



Google