latest reactions

spider
One way is to google for page which cont …
andy
you can find this tool here http://andy. …
Tjarko
Eej Walker, that's pretty cool, I will c …
Walker
Thanks for posting your thoughts. I modi …
Albert
Thanks !! …

Clicky Web Analytics
Use OpenDNS
ZERIGO DNS

Ultimate dns hosting based on pre-defined templates, DNS redirection and lot's more.

mxna feeds

CF101 Archive: September 2007 Object Oriented PizzaJob Opening for ColdFusion Developer at Arizona State UniversityMy New Experience Getting ColdFusion Builder 2 Console WorkingCF101 Archive: February 2007 Data Table GatewaysJob Opening for Sr. ColdFusion Developer in CA/ San Fernando ValleyColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)Best wishes for the new FuseboxCF101 Archive: January 2007 Data Access ObjectsOpen Source Conference For CFML DevelopersSkype Blocking Web Services with IIS, ColdFusion & RailoCF101 Archive: October 2006 Five Cool Things with ColdFusionGenerate a tag cloud from an RSS feed with ColdFusionColdFusion MeetUp: Cloudy with a Chance of Tests, with Mike HenkeReminder - Adobe CookbooksCF101 Archive: September 2006 A first look at FusionDebug

All files are strictly confidential: all information is classified.
© Copyright 2002 - 2012 mximize.com.
All right reserved.

Visit Carlos GallupaMXNA webfeed

Simple, but effective mobile redirect function

<cffunction name="isMobile" returntype="boolean">
    <cfset var ret = false />
   
    <cfif cgi.http_accept contains "text/vnd.wap.wml" || cgi.http_accept contains "application/vnd.wap.xhtml+xml" || structKeyExists(cgi,"HTTP_X_WAP_PROFILE")>
        <cfset ret = true />
    <cfelseif findNoCase("iphone", cgi.http_user_agent)>
        <cfset ret = true />
    </cfif>
   
    <cfreturn ret />
</cffunction>

<cfoutput>
    Is it a mobile? #yesNoFormat(isMobile())#
</cfoutput>

6709 viewed | 2 opinion(s)  | del.icio.us | Digg it | Tjarko @ 01/02/09 22:21 cet


Reactions:

Idel wrote.... (site)

I suggest to use the Apache Mobile Filter, this apache module give all information about the device as environment variables. And also its render the images to the screen size of mobile devices.
Is an open source project, it is free and you can use with every language you want.

For more info:http://www.idelfuschini.it/apache-mobile-filter-v2x.html

14 May 2009 22:55 cet  

Lori S. wrote....

FYI, I was using this successfully in CF 8, but under ColdFusion 9 you'll need to change:

structKeyExists(cgi,"HTTP_X_WAP_PROFILE")

To:

CGI.HTTP_X_WAP_PROFILE IS NOT ""

This is because under CF 9 ColdFusion always returns true when it tests for the existence of a CGI variable.See the CGI environment variables page in the online CF 9 documentation for info.

09 June 2010 19:56 cet  

Leave your comment

Your name


Your url/website/link/email....


Some room for your reaction is placed here..



The answer to the ultimate question is?? (42 ;-))




URL en mail addresses are translated for you... life sometimes is that simple!!