biff Posted January 2, 2005 Posted January 2, 2005 Hi Folks, I'm new to PHP but have programming knowledge. I've been experimenting with PHP and it looks like the way to go for me. I'm looking for a PHP Browser Detector to use in my html pages so I can serve the correct style sheets to browsers and format the pages for proper display. Can you tell me where I can get one? Free would be great but I'm willing to purchase one too. Thanks a mil. Quote
LisaJill Posted January 2, 2005 Posted January 2, 2005 (edited) You might want to read this and these other google results for php browser detection. =) Edited January 2, 2005 by TCH-Lisa Quote
borfast Posted January 2, 2005 Posted January 2, 2005 This browser detection code made by Gary White is very good: http://www.apptools.com/ Quote
biff Posted January 2, 2005 Author Posted January 2, 2005 I read a bunch of those articles at the links. I had read a few prior to posting here. What do you guys use? I'd try some of those scripts at the links but I don't want to vilate any copyrights. What I'd like to do is find somebody who'll say, here is a script you can use on your website. I don't mind paying for it, I just need to locate one that I'm sure I can use on my site. Raul, that one script says it's free but it takes forever to read the Agreement. By the time I read the agreement, I lost touch and didn't even remotely understand it. Thanks guys for your help, I appreciate it. If you run across a script I can freely use, please let me know. Quote
LisaJill Posted January 2, 2005 Posted January 2, 2005 GPL is a standard license that means that you are free to use and change the script as long as credits within the script remain intact. Feel free to use it. =) Quote
biff Posted January 2, 2005 Author Posted January 2, 2005 Thanks Lisa, I'll check the scripts again. I ran across a couple with the GPL License. Quote
biff Posted January 2, 2005 Author Posted January 2, 2005 Raul, I downloaded the script by Gary White. It's very comprehensive and looks good to me. I have a couple questions, sorry but I'm a PHP newbie Should I install the PHP browser detector file in the same folder as the other files that use use the detector? Or does it have to be uploaded to some other location such as a CGI folder for example. I'm assuming I install it in the same folder as the viewer documents and call it with includes placed at the top of my html files. Thanks Quote
TCH-Don Posted January 2, 2005 Posted January 2, 2005 You should be able to put it where ever you wish and use include $_SERVER['DOCUMENT_ROOT']."/path/file.php"; to include it. Quote
biff Posted January 2, 2005 Author Posted January 2, 2005 hey Don, Long time, no chat. Thanks a lot. Quote
biff Posted January 5, 2005 Author Posted January 5, 2005 Greets again, I have aquestion about the PHP. First the prelude: I downloaded the Browser Detector that Raul recommended. I made no mods to the file and loaded it up on one of my computers that has Apache Server installed. I connected with another box through ftp and uploaded my site and then began to work on learning to use the browser detector. I got it working and figured out how to call the detector from the web page and serve different content according to whatever browser. It seems to work great. Now the question: If I load the browser detector up on my TCH hosted site and change my pages to .php extension so that I can serve dynamic pages, is there any possible way that I could screw up something on the server? In other words, is there any way the browser detector or any of my files uusing it could corrupt or damage my site or any of TCH's software or equipment? Since I'm just starting, I have very little knowledge of PHP and don't want to risk damaging anything. Thanks for help. Quote
TCH-Don Posted January 5, 2005 Posted January 5, 2005 I don't think you can do any harm. The most you will run into is a script that may have an error and it will not work. Then you will see an error message tell you what file and line number the script stopped working at. Quote
biff Posted January 6, 2005 Author Posted January 6, 2005 Thanks Don, i'll give it a shot when I get my pages ready. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.