Quote:
Originally Posted by wayfarer07
Here's a super simple way, though the disadvantage is it will show up in the HTML:
PHP Code:
echo '<iframe src="http://yoursite.com/track.php?url='.$_SERVER[HTTP_HOST].'&path='.$_SERVER[SCRIPT_FILENAME].'" style="display: none;"></iframe>';
Kinda silly, but it will work. I would have thought the example you gave would be the best way. It is what I would have tried first.
|
Well, 1st of all i'd like to say the idea of iframe is really very helpfull and solve the problem of slow loading
but the code you've directly added can't not used for the following reason
" the idea depends on open up a text file at following URL and write on it the url of the php script you wanna track "
hence the combination of iframe code and the full code
can be be as following
- We create a php file called X.php
- We add at x.php the following code
then at the php script we wanna track we add to it iframe code
PHP Code:
echo '<iframe src="X.php'" style="display: none;"></iframe>';
It will load fast and also with no error cause i can't use only the link without the commands
Code:
@fread($f,10);
@fclose($f);
I hope you got wt i've ment
Now the problem
HOW TO PROTECT LOL THE X.PHP FILE
i found a good way in mind, lol we will add a function to the php script we wanna track to prevent edit or delete of x.php file
Say x.php file was 779 Bytes
then
Code:
if (file_exists("x.php")) {
if (filesize("x") != 779) die();
} else {
die();
}
so the x.php if it edited or deleted , the script won't work
further more thoughts
we can encrypt x.php with any stand alone encryption such as
TrueBug PHP Obfuscator
further more thoughts
we encrypt only x.php file and the file which contains the ifram code and the protection file function of x.php file
i think this gives a good protection for the script , if it used in another website it will gives you the url
if the owner deleted or edited x.php file the script won't work
LOL i know i maybe a silly girl but i'm try to use the most simple easy way to protect my script and in same time not bother the owner cause i hate zend and ioncube and such encryption and wt is called license per domain..ect
thanks for your help