Hey Guys,
I'm just experimenting at the moment - I've made a small application in C# that uses a WebBrowser Control to navigate to a website (which is currently on my LocalHost using WAMP) using a custom UserAgent (HelloWorld)
Now, when I echo the useragent, it tells me what I want to hear. So for example - when I use this code I created:
<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>
it tells me my UserAgent is HelloWorld - which is what I want. But, I want it to display a message. So, I use this code that I've created:
<?php
$ua = $_SERVER['HTTP_USER_AGENT'];
if ($ua="HelloWorld")
{
echo "Your Using the C# Application<br/>";
echo "Success!";
}
else
{
echo "You're not using the C# Application<br/>";
echo "Not a Success!";
}
?>
But when I use Chrome, it still displays the success message - when it shouldn't.
Basically I'm trying to display a message when a SPECIFIC useragent is used.
I'm not having much luck, so all help is appreciated!
Thanks,
Brownie.