The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

[I need help] Website Script for Visitors [Please Read]

IndeXer

Well-Known Member
I have a brilliant idea, but for that idea to execute I need little help from you people. I am going to give an overview of it please let me know how can I compile those scripts.

I am going to upload two tools in my website, one will be for Mac users and second will be for windows users, now I want something/script which can automatically detect Mac user and whenever mac user click on download it should download Mac version of my tool.

Same thing should go with windows user, if a windows user click on download it should download windows version of my tool. Can somebody suggest anything how can I execute that and what type of script do I have to use.

Any help will be highly appreciated.

Note: English is not my first language.

Regards
IndeXer
 
Hi @indexer . I googled it now . I think u can use php for it which is
HTTP_USER_AGENT
Which is generated when page loads .Lets u know the OS being used

Php Code :

<?php
$user_agent = getenv("HTTP_USER_AGENT");

if(strpos($user_agent,"Win")!== FALSE)
{
$os ="Windows";
}
elseif(strpos($user_agent,"Mac")!== FALSE)
{
$os ="Mac";
}
?>

ANd u can use a php condition to run which tool to downlaod in what OS >

<?php
if($os ==="Windows")
{

}
elseif($os ==="Mac")
{

}
?>

I just tried it in mine Works ,:)
 
I think you can do this using javascript and don't require any server side code.

You could use the navigator object and the appVersion property in particular, like so:

if (navigator.appVersion.indexOf("Win")!=-1) --> Windows
if (navigator.appVersion.indexOf("Mac")!=-1) --> Mac
 
Hi @IndeXer

This response is late but I hope that will help others.

You can use tokens from your traffic sources and with just tests like the response above you can filter the visitors and redirect them to any page you want.

If you still need help in coding PM me here, I will be happy to help with that.

Best Regards,
Netabdo
 
MI
Back