Detect Sony PSP browser?
Hello, Is there a JavaScript or PHP code I can use to detect the Sony PSP browser (no matter what firmware the PSP runs) and refer them off to another page when they go to my site? Something like so that if it's a PSP, it goes to psp.html, but "else" and it just keeps loading the page (void(0);). I'd prefer PHP but JavaScript will do fine if it's the only way. Thank you
Public Comments
- boo @ redirects
- put this code in top of your <html> tag: <?php if (ereg('PSP', $_SERVER["HTTP_USER_AGENT"])) header('Location: http://domain.com/psppage'); ?> as long as there's an PSP in it's user agent it will direct you to your psp page if not it will just continue to your main page this is based on wikipedia's entry on PSP http://en.wikipedia.org/wiki/User_agent#PlayStation_Portable
Powered by Yahoo! Answers