Protect web content

  • 14 years ago
    Hi All,

    I am a web developer and I am lately becoming fairly security conscious.

    So two questions for you and any help appreciated.

    1)I have my hesitations about my web code being revealed to everyone through the "view page source" feature of web browsers. Apparently the source review may reveal quite a few hints that affect security. Is there a way to prevent people from seeing this?

    2)Being a web developer (especially PHP) I would like to know how I can restrict my programs to run on specific domains only. In this way if someone steals my code he can not deploy it on his server.


    Thanks for your help all

    peter
















  • 14 years ago

    well only stuff that is actually echo'd to the browser is viewable in the source of the web page... so that'll just be the xhtml and javascript in most cases. so limit your use of javascript and use PHP whenever you can. I was going to just say "use PHP instead" but then I noticed that you do....

    so as long as you code your PHP correctly, you should be able to stay pretty safe from attack. I say pretty safe, because no system will ever be 100% perfect.

    with regard to your code running on other domains... if it's PHP code then that's not really possible. Well, it is... but then the thief would just spent 3 seconds deleting the line which supposedly prevented it being run on other domains. Since PHP code is open, ie. not compiled, it's always there to be viewed/edited.

    If you have some specific code that you only want running on your server, then you'd probably best compiling it into an exe or something.... but running that through a web server is a bit outside of my area of expertise I'm afraid! Google will tell you, no doubt Wink [;)]

  • 14 years ago
    Is there not any way to implement any kind of encryption into the coding etc? As surely this would reduce security risks (though far from obliterate them).

  • 14 years ago
    Hi arry2002uk,

    As I said in some other forums, I found a tool that really did what I was looking for. I am sending you a sample file that I encoded.

    http://www.geogreen.gr/welcome.html

    Do "view page source" to see if you can distinguish any code. Everything is encoded pretty well.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In order to understand recursion, one must first understand recursion.”