iCreativeLabs blog

We LOVE our JOBS and we SHARE for you
Subscribe

Play cheat with W3C CSS Validator

If you design or create website you must validated the CSS and HTML. You can find the css and html validator from w3c validator. When i used thickbox in my site the css not valid cause thickbox used css3 and the validation use css level 2 :(

Icreativelabs not validate the css


I think i must played cheat with this validation cause it’s make me feel sick. I make some modification for the engine for played cheat with this W3C engine.

First I learn what engine that W3C have and if found this on my engine [HTTP_USER_AGENT] => W3C_Validator/1.575 .When i see that i got the point, W3C used custom engine and the call the engine with W3C_Validator . I think i can modified my code and put some code for hide my thickbox.css from this engine.

This is the code for hide my CSS


<?php
$text         = $_SERVER["HTTP_USER_AGENT"];
$findme        = 'W3C';
$engine = strstr($email, $findme);
if (!preg_match("/".$findme."/i", $text)) { ?>
<link rel="stylesheet" href="thickbox.css" type="text/css" media="screen" />
<?php } ?>

You just need change the line 6 with your css that you want hide :)

And when i checked on W3C once more time, they said this site already validating :D you can see here

Icreativelabs css is valid



Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon


7 Comments

  1. Plester

    Hahahaha, nice trick mate


  2. Plester

    geblek :))
    gw pake yak … cuma kayaknya gak bakal tahan lama sampe w3c tau :P


  3. Plester

    Thanks for the information.


  4. Plester

    sick way to fool robot.. hahahahaha


  5. Plester

    trackback from arenosoft.wordpress.com
    Indonesia Software Engineer Outsource


  6. Plester

    Wakakak curang..


  7. Plester

    HEHE:-) .. Nice work man ..

    ” if you can’t make it - fake it ”

    I am happy user on http://www.vinzenzkummer.com


Plester

Leave Comment