Pages: 12

  2008-09-01 08:23:51

zidaine_38
» n00b
FTalk Level: zero
10
0
1969-12-31

credits: IDEA COMES FROM------> [url]http://theftalk.com/t34319-How-to-Inject-JavaScript-via-PHP.html[/url] [b]WHY HIDE JS FILE?[/b] >> to protect your own codes from rippers. [b]WHY LOAD

[quote=lordheinz]This is not working,i tried it in my other profile and it seems my js are not loading.. :arrow: and this php that you are posting(http://christers.net46.net/js.php) obviously we can't see the source.. will you site us more example... here is my UID: 1234567 my url: http://profiles.friendster.com/mangjose ^ this is just an example js any js you can give...just want you to site an example..[/quote] you can't see the code because it is hidden already. [b]EXAMPLE[/b]: your old javascript-file([i]example[/i]):[spoiler]var NESTED={ h:[], f:function(){ }, some:function(){ } }; function onProfileOnload(){ foo=bar; alert('welcome '+pageViewerFName+' !'); //block of codes...... } function blah(){ } var blah='foobar'; onload=onProfileOnLoad;[/spoiler] then your code must be...... : [spoiler]<?php $referer=$_SERVER['HTTP_REFERER']; if(!preg_match("/^http:\/\/profiles.friendster.com/",$referer)){ ?> [color=green] <script> u='GODLOVESYOU'; while(u=='GODLOVESYOU'){ alert('forbidden!'); } </script> [/color] <?php } else { header("Content-type:text/javascript;charset:UTF-8"); ob_start("gz_handler"); ?> [color=red] var NESTED={ h:[], f:function(){ }, some:function(){ } }; function onProfileOnload(){ foo=bar; alert('welcome '+pageViewerFName+' !'); //block of codes...... } function blah(){ } var blah='foobar'; onload=onProfileOnLoad; [/color] <?php } ?>[/spoiler] [b]LEGEND[/b]: [color=green]GREEN[/color] - this is the text that will appear to the ripper if they go to your js file directly [color=red]RED[/color] - place your javascript file here (this part is protected [i]no one can rip it[/i])

Last edited by zidaine_38 (2008-09-01 08:31:33)

Pages: 12

Board footer

© 2025 F Talk

Current time is 09:46

[ 12 queries - 0.010 second ]
Privacy Policy