X-Static Codes
Chat to Us @
SNM Chat
in #X-Static
Home
|
Contact
Login
Register
Search
Scripting
Snippets
Tutorials
Competitions
Links
Memberlist
Pastebin
Affiliates
Contact Admin
Sponsors
Nameless
Official #nameless website
Rooted.in
I got Rooted did you?
Stats
Total Members: 56
Newest User: Nofilicity
Snippets Added: 153
View
Hide your CSS
Snippet Author:
FURBY
Rated:
Snippet Description:
It hides your CSS Source
<? /* This goes at the top of the page Settings - Edit this... */ $server = array("server"=>"localhost","username"=>"root","password"=>"root","database"=>"table"); mysql_connect ($server['server'], $server['username'], $server['password']); mysql_select_db($server['database']) or die('Cannot select database'); $filename = 'style.css'; //This is where we write the style to! $rewrite = "Oh no sorry, not going to reveal my source for the CSS!"; if ($style=mysql_fetch_array(mysql_query("SELECT style FROM style"))) { if (!is_writable($filename)) { die("Can't write to $filename"); }else { if (!$handle = fopen($filename, 'w')) { die("Cannot open file ($filename)"); } if (fwrite($handle, $style['style']) === FALSE) { die("Cannot write to file ($filename)"); } fclose($handle); } } /* thats it, it, then in the header tag just add <link rel="stylesheet" href="style.css" type="text/css"> and whola */ ?> <head> <link rel="stylesheet" href="style.css" type="text/css"> </head> YOUR HTML GOES HERE <? if (!is_writable($filename)) { die("Can't write to $filename"); }else { if (!$handle = fopen($filename, 'w')) { die("Cannot open file ($filename)"); } if (fwrite($handle, $rewrite) === FALSE) { die("Cannot write to file ($filename)"); } fclose($handle); } ?>
Favorite Script
-
Smilies
Message:
Comments: