I found some code. but it' not working
the code witch i want to protect
Code:
<html>
<head>
<title>Test</title>
<link rel="stylesheet" type="text/css" href="Excss/css_test.css"> //external css in the folder of Excss
<script type="text/javascript" src="Exjs/js_test.js" ></script> //external js in the folder of Excss
</head>
<body>
</body>
</html>
then the new code....
my.html
Code:
<html>
<head>
<title>Test</title>
<link rel="stylesheet" type="text/css" href="hide.php?type=css&serve=css_test"/>
<script type="text/javascript" src="hide.php?type=js&serve=js_test"> </script>
</head>
<body>
</body>
</html>
hide.php
Code:
<?php
if (defined('IN_SITE'))
{
$sPath = '';
switch(@$_GET['type'])
{
case 'css':
header('Content-type: text/css');
$sPath = 'Excss/' . @$_GET['serve'] . '.css';
break;
case 'js':
header('Content-type: text/js');
$sPath = 'Exjs/' . @$_GET['serve'] . '.js';
break;
}
// sPath should be a non-published directory
$fp = @fopen($sPath, 'r');
if ($fp)
{
fpassthru($fp);
fclose($fp);
}
}
?>
why is this not working? can anyone correct this code.....?
Bookmarks