Showing posts with label Million Pixel Website. Show all posts
Showing posts with label Million Pixel Website. Show all posts

Wednesday, 8 April 2009

IE8 and browser detection

Do you develop websites of your own? If so you may use browser detection methods to find out what the browser used and tweak your website to look nice in other browsers.

Finally moving to IE8 and bypassing version 7 I found that the browser is not detected using PHP. In IE 7 I could use the code:

if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') )
{
$browser = 'ie7';
}

This works for 6 and 7 by changing the number. However for in PHP IE8 reports:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; MSN OptimizedIE8;ENGB)

The work around in PHP I used was "OptimizedIE8". By tweaking my detection script, I added:

if ( strpos($_SERVER['HTTP_USER_AGENT'], 'OptimizedIE8') )
{
$browser = 'ie8';
}

For those of you that like to avoid JavaScript and use PHP, I hope this helps. Others that use ASP, I'm sure you have something to combat this too.

If this still does not work on IE and my website then please let me know. Thanks.

Thursday, 12 March 2009

Million Pixel Website

Have you wanted to advertise online but don't want to pay a fortune for the advertisement, then this website is to help you grow you website. Rather than creating another website full of adverts that annoy viewers, this website uses pixels that you can use to link to your site.

How do I advertise you may ask? You choose a range of squares (pixels) and create an image to upload to the website. Our viewers will see the wonderful images and if they like yours, then you will be fortunate enough to get more customers to your website.

All I ask is that you don't offend others by discrimination, swearing or other put downs. I will monitor this daily to remove adverts that I believe to be bad in some way.