tailieunhanh - Mobile Web Development phần 5

Thiết kế kiểu dáng đẹp và mỏng đang thịnh hành, đặc biệt là bởi vì một chiếc điện thoại di động cũng là một tuyên bố phong cách. Có mô hình mới nhất là một biểu tượng trạng thái ở nhiều thị trường! Gọi như tin nhắn SMS (Short Message Service, tin nhắn, hoặc Văn bản phụ thuộc vào một phần của thế giới bạn đến từ), | Chapter 4 At the heart of any device detection is the User Agent header sent by the browser. All device detection techniques check the User Agent _SERVER HTTP_USER_AGENT variable for PHP and look up their database to find the characteristics of that device. Here are some of the things WURFL can tell you about a device Screen size of the device Supported image audio video ringtone wallpaper and screensaver formats Whether the device supports Unicode Is it a wireless device What markup does it support What XHTML MP WML cHTML features does it support Does it work with tables Can it work with standard HTML Does it have a pointing device Can it use CSS Does it have Flash Lite J2ME support What features Can images be used as links on this device Can it display image and text on the same line If this is an iMode phone what region is it from Japan US Europe Does the device auto-expand a select drop down Does it have inline input for text fields What SMS MMS features are supported The list goes on. But you can make some intelligent decisions in your application based on the device now. You can even conditionally print wall tags. . show a download link only if the device has download support. WURFL API is available in many programming languages including Java PHP .Net Ruby and Python. You can download it from http wurfl. sourceforge. net . XML Processing can Bog Down My Server is There Something Easier Yes The WURFL XML file is above 4MB and despite many structural optimizations processing it on every request will certainly slow down your server. Many APIs provide caching to speed things up. But having this available in a database will be best. Tera-WURFL is a PHP package that uses MySQL to store WURFL data. It bundles WALL and an admin panel making it the top choice for mobile web adaptation. Setting up Tera WURFL involves downloading the latest package from http extracting the files and entering the database connection information in the configuration

TỪ KHÓA LIÊN QUAN