Jump to content

Redirection to another page


ameliabob

Recommended Posts

I am trying to write a function that determines the users browser and then calls the appropriate program./function,

 

I am using this is "startup.php"

 

[codebox}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><?php $useragent = $_SERVER['HTTP_USER_AGENT']; $a = explode("(",$useragent); $d = explode(";",$a[1]); switch (substr($d[0],0,6)){ case "iPhone": header("Location: http://testcomsum.atflorida.us/phone.startup.php"); break; case "Window": header("Location:http://testcomsum.atflorida.us/c.startup.php"); break; case "Androi": header("Location: http://testcomsum.atflorida.us/phone.startup.php"); break; default: echo("The device called is ".$d[0]." and needs to be added."); }?>

[/codebox]

 

I get the message that the startup.php cannot be found.

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...