trying to redirect to external site with php

cipcsl

New Member
I'm trying to redirect mobile users and am attempting the following, but it doesn't actually redirect at all... \[code\]$ua = strtolower($_SERVER['HTTP_USER_AGENT']);//print $ua;$search = array('windows ce', 'avantgo', 'mazingo', 'mobile', 'iphone', 't68', 'syncalot', 'blazer');foreach($search as $sk => $sv) { if(preg_match('/\b'.$sv.'\b/i', $ua)) { header("Location: http://m.example.com"); exit; }}\[/code\]
 
Back
Top