CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
redirecting wap users

 



seriousfun
Novice

May 22, 2001, 2:48 PM

Post #1 of 2 (539 views)
redirecting wap users Can't Post

Is there a way to detect a wap user so that they can be redirected to the wap area of the site but let normal users pass through seamlessly?



Kanji
User / Moderator

May 22, 2001, 8:27 PM

Post #2 of 2 (528 views)
Re: redirecting wap users [In reply to] Can't Post

A very simplistic -- and non-comprehensive -- method would be to check if the browser accepts WML ...


Code
  use CGI qw( :standard );


Code
  if ( Accept('text/vnd.wap.wml') ) { 
redirect('http://localhost/page.wml');
exit;
}

If you're using CGI.pm v2.43 or below, you'll need to change Accept() to accept.



 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives