dcsimg
Results 1 to 3 of 3

Thread: Save html/php file to a database and load it dynamically? For "protection" purposes.

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    10,961

    Question Save html/php file to a database and load it dynamically? For "protection" purposes.

    I just want it to be a little bit difficult for others to see my code so I am contemplating on saving them in the database and just load them dynamically, would that be feasible? It's like a CMS but I am not sure if they are the same since I want to save the entire contents of the file instead.

    Any other solutions are welcome!

    TIA
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,321

    Re: Save html/php file to a database and load it dynamically? For "protection" purpos

    Maybe but what's the point?
    A firebug like will expose every bit of client side code anyhow.
    Also depends if you are writing on server side or client side. Server side would be more difficult to manipulate in order to reach the web page "fixed" for creating the html.
    Client side can be manipulated. I was doing some coding a while back, using html templates, maybe you can take a look at those. You can just get you inputs ready and fill the data from server side. But I guess you mean the code written dynamically, so that's why I said what is the usage in that? If it is server side then it can't be read anyhow and if it's client side it would need to be translated to html, javascript, the lot, in order for the browser to interpret it, so you can't really hide it.
    If you are determined then search for javascript or html obfuscation . See if you can find anything (doubt it).
    Slow as hell.

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    17,743

    Re: Save html/php file to a database and load it dynamically? For "protection" purpos

    I send HTML to my pages using AJAX calls after they load all the time. I even have "hot re-load" capability so I can make changes and re-load that HTML without forcing a login from scratch.

    Some of that HTML comes from tables in the database and others from small snippet files on the web server.

    I also send JavaScript to my pages using AJAX calls - that is also stored in the database. That way my SlickGrids can have function stubs for BEFORECELLEDIT and ONCHANGE events...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width