I need code, that is not copyrighted by someone else, for redirecting mobile phones from a primary website to the mobile device.
The code needs to redirect all mobile devices from one url to another (mobile) url.
No htaccess code please. Only php and/or javascript.