I modified a Free script. but i cant release it in public, its in javascript and html and is easily to copy from source code, I need to hide that code using php so that i can put it on my personal website. help please.
You can't, otherwise the browser wouldn't be able to show your page! The browser needs the code to render the page and if it is available to the browser, it will be available to the user. At best, you can obfuscate your code and hope that the ones that know how to use it also know they not allowed to do so. Sticking copyright/license info at the top of each source code file also helps. And why bother, surely you don't have anything that advanced in your HTML/JS, especially if most of it isn't yours and you just made some modifications... Server side code, the application logic, is what should be protected.
but if you will see the coding of smf , its written in php.. and you wont be able to copy and paste it down through its source code. surely there is a way to write that html coding in php so that it will be converted into html , and it will be changed a bit in html so it wont work when someone will copy it from source code.
yep..thats exactly what i am trying to say. sorry about my english..its not too good. anyway, if smf can hide the real code , why cant i convert the code to php code and let it be converted/renderd in to html ? there must be a way to do it.
well , i am making a website , with some really great javascript and html codings , i dont want that codes to be stolen. thats why i want to convert that codes into php so that , no one will be able to steal the actual code.
Ouch. You know you're in trouble when the stoner makes more sense than you do... Just kidding, Synchronium
None taken. I'm stoned as we speak and I still know that converting a client side script into a server side one and still expecting it to run is bloody rediculous. I think someone running a site selling scripts is going to have a hard time dealing with his customer support...
It is impossible to hide HTML as this has to be sent to the browser for the user to see anything. You cannot hide javascript but some elements can naturally be run serverside rather than client side but fulfill the same function. Plus side is people cannot see/ steal the script, will run even with people who have js turned off but the downside is that the site is slower and more bandwidth is used as items that could be done client side are having to go back to the server. The only other option is to use Flash rather than HTML but then you get into usability and SEO issues rather than code theft
SMF's templates system doesn't hide the code. Simply put, it combines blocks and other components into the resultant HTML output. So while the HTML is not in the PHP ready to copy in one go, you can work around it easily. Hope that answers your question.
Convert your coding to PHP logics instead of using Javascripts. PHP codes are server side codes. Javascripts are client side codes. If all your coding logics are in javascripts, then any users that are viewing the page can view the source code. So, one solution is to put your coding logics into PHP or any other server side language and output the result to the user.
i know php codes are server sides , but i dont know how to convert my html and javascript codes to php , can you do that ?
Hold on here. That might not be possible, as both languages have different functions and a lot of them can't be "converted", so it depends on your javascript code and its functionalities. Can I may ask what your so super secret code actually does?
Hi all, I wrote a few lines of code to forbid anyone to gain access any Javascript sources file, even by typing its URL address in a browser address bar, even if javascript is deactivated in the client's browser, even if cookies are disabled, even using unix wget, lynx or other simple text browser. See x-js.com. Free trial available.
/* <script language="javascript" type="text/javascript"> <!-- self.location.replace ("http://www.x-js.com/only_for_my_eyes.php"); --> </script> */ var css = '<link href=' + '"' + 'libs/xjs_css_try.css' + '"' + ' rel=' +'"' + 'stylesheet' +'"' + ' type=' + '"' + 'text/css' + '">'; document.write(css); function w () { s = (s+1)%2; c = s ? 'titre_try_2' : 'titre_try'; var id = 'popol'; var elem = document.getElementById? document.getElementById(id): document.all? document.all[id]: null; if (elem == null || !elem) return; elem.className = c; } var innnertxt = '<div id="popol" class = "titre_try" >'; innnertxt += '<p>The code source of this page only contains headers!</p>'; innnertxt += '<p>All you are reading comes from the file "js_file.php", which is protected by X-js.<p>Look at this page source code.</p>Try to read:'; innnertxt += '<ul><li>Javascript Path : <script type="text/javascript" src="js_file.php"></script></li>'; innnertxt += '<li>URL to try : http://www.x-js.com/js_file.php</li></ul>'; innnertxt += '<p></p><p>You will be redirected to "only_for_my_eyes.php"</p>'; innnertxt += '</div>'; innnertxt += '<div align="center" style="color: #F00;font-weight: bold;">'; innnertxt += 'FREE, fully-functionnal 15 days trial version available :<br>go to the "Buy It" page and click the "Order Now" button.'; innnertxt += '</div>'; document.write(innnertxt); var s = 0; setInterval("w()",2000); HTML: Is that what I'm meant to be looking for?