Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 26-07-2005, 08:34 PM   #1 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default PHP - User Browser Detection...


Hello Guys,
I want a php script so show a link on the web page depending on user's browser. Is there somebody to make such a script....

I want to show a different link for Opera, Firefox ,Internet explorer and undetected browsers...Please post the php script if u know...

Full Code Plz...i dont know much php..



Thanx.
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-07-2005, 09:44 PM   #2 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default

Code:
<?php
	echo "Your current browser is: ";
	echo $_SERVER['HTTP_USER_AGENT'];
?>
This is how u detect the browser. I guess this will help u to redirect.
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 27-07-2005, 12:22 PM   #3 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

Thanx but
i want to show a link relative to the browser the visitor is using....

like if he is using Internet Explorer...

I will show him : http://www.mysite.com/forinternetexplorerusers.htm

Fore Firefox:-
http://www.mysite.com/forfirefoxusers.htm

Please help...
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 27-07-2005, 01:28 PM   #4 (permalink)
Wise Old Owl
 
alib_i's Avatar
 
Join Date: Jun 2004
Location: omnipresent
Posts: 1,191
Default

cant you do this much .. just put an if-else condition there

this will help ::
Code:
$br=$_SERVER['HTTP_USER_AGENT']; 

if (eregi("firefox", $br)) 		echo "http://www.mysite.com/forfirefoxusers.htm";
elseif(eregi("opera", $br))		echo "http://www.mysite.com/foroperausers.htm";
else							        echo "http://www.mysite.com/forinternetexplorerusers.htm";
-----
alibi
__________________
What I've felt, What I've known; Never shined through in what I've shown
Never free, Never me; So I dub thee unforgiven
-Metallica
alib_i is offline  
Old 27-07-2005, 01:42 PM   #5 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

lol...no i cant...i am total nil on php...as i have said in my post.....

Anyways thanx
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 28-07-2005, 11:39 AM   #6 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

Do you know Javascript? This can be achieved even by Javascript.

If not, then wait for 2-3 days. I am learning PHP and was on the look for a small project. I will take up this one
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 28-07-2005, 12:40 PM   #7 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

hey tuxy me too learning php....And i made this script workin...

Which book u following ???
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 29-07-2005, 12:22 PM   #8 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

Glad to know you've got it working. I know its pretty simple but post the code anyway

I am as of now reading an e-book PHP 4 in 24 hours. Next stop is MySQL in 21 days
tuxfan is offline  
Old 29-07-2005, 07:02 PM   #9 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

The one
Code:
$br=$_SERVER['HTTP_USER_AGENT'];

if (eregi("firefox", $br))       echo "http://www.mysite.com/forfirefoxusers.htm";
elseif(eregi("opera", $br))      echo "http://www.mysite.com/foroperausers.htm";
else
worked just fine for me....
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 05-08-2005, 04:57 PM   #10 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

Hello Guys, I have picked some PHP and made a MailBomber script using the PHP Mail Function.

I named it Hee-Haw Mailer (A.K.A Horselaugh Mailer

Get it from my site ... http://www.kkavyanjali.com/heehaw

Made it just for educational purposes...
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Krow
- by abhidev
- by topgear
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 07:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2