SitePoint Sponsor

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 25 of 91
  1. #1
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I hide my HTML code from others?

    Is there any method using php by which I can hide my code ( HTML) from user. i.e to make it invisible on 'View Source'?
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't

    This has been addressed here time and time again - it's just impossible.

    -Sam
    Sam Hastings

  3. #3
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    atleast my javascript... ?
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hpnadig
    atleast my javascript... ?
    Sorry, it's the same with that.

    Anything that is on the internet, provided it is processed client-side (HTML, JavaScript, Flash, images etc) can be stolen or saved.

    There is nothing you can do to stop people taking it.

    -Sam
    Sam Hastings

  5. #5
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But you cannot decode Flash files .. can you? And aa with images.. we donot give full image. do we?
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  6. #6
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    The same old story...

    You cannot simple as that; If you do not want your pages cached; People looking at your HTML / Javascript / Whatever then do not upload your pages.

    Now, there is a solution for you

  7. #7
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hpnadig
    But you cannot decode Flash files .. can you?
    Depends...you can't always decode them...it depends whether the creator disabled it.

    And although this point is true, it still doesn't stop people saving the files to their hard drive, which is what you asked originally. So it is just as easy to redistribute a Flash (SWF) file as it is to distribute an HTML page.

    And aa with images.. we donot give full image. do we?
    Sorry, I'm not sure exactly what you mean here...would you mind clarifying?

    -Sam
    Sam Hastings

  8. #8
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in short: you can make it a little more or even much more difficult that others view your source
    but you cannot avoid it.
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  9. #9
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML and javascript is the most open of open source. If you don't want it open, don't create it.
    Aaron Brazell
    Technosailor



  10. #10
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no point in hiding javascript / html anyways. Nothing is "all that special" and worth stealing in html..

    If someone wants to take your design / code, they will take it regardless of the restrictions you put in place

    Though... with a alot of overhead, and a php script, you COULD hide your javascript
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  11. #11
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zaire
    Though... with a alot of overhead, and a php script, you COULD hide your javascript
    How would that be done...?

    -Sam
    Sam Hastings

  12. #12
    Who Me? JeremyL's Avatar
    Join Date
    Dec 1999
    Location
    Dallas, TX
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    While it may not be completely possible, there are definite ways to keep 99% of the people out there from seeing it.

    Check the source code from http://www.exocontrol.com/demo/

    The average person on the net will not be able to figure that out.

  13. #13
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    exoGameCtl 2.0.7i is only designed for Microsoft Internet Explorer.

    We are working on a Mozilla design for v2.1!

    Sorry for any inconvenence.
    (I use Opera)

    Riiiigghht. Hides your worthless HTML from 99% of world, yeah, because most of them can't even view you page AT ALL.

    Stupid Javascript "HTML Encrypting" tools are 100% guarenteed to drive visitors away, and brands you instantly as a clueless newbie fool.

  14. #14
    Who Me? JeremyL's Avatar
    Join Date
    Dec 1999
    Location
    Dallas, TX
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Phil.Roberts
    (I use Opera)

    Riiiigghht. Hides your worthless HTML from 99% of world, yeah, because most of them can't even view you page AT ALL.

    Stupid Javascript "HTML Encrypting" tools are 100% guarenteed to drive visitors away, and brands you instantly as a clueless newbie fool.
    LOL most of the world uses IE but that's off subject.

    I never said it was the perfect solution, but it is an option for some. Just like opera isn't the perfect solution but it has it's own set of benefits so it is the choice of some. [img]images/smilies/smile.gif[/img]

  15. #15
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone who has enough technical knowledge to rip a website from it's HTML source is more than capable of defeating such pathetic tricks. So you're basically blocking access to people who would not even WANT to see the source.

  16. #16
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IIRC a way around HTML encryption is to stick the following in your address bar:

    Code:
    javascript:a='<pre>'%20+%20document.getElementsByTagName('html')[0].innerHTML.replace(/&/g,%20'&amp;').replace(/</g,%20'&lt;').replace(/>/g,%20'&gt;').replace(/"/g,%20'&quot;')%20+%20'</pre>';
    Then you get the full, proper HTML for the page

    -Sam
    Sam Hastings

  17. #17
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, for those who are interested: Hide Your Source Code
    But as i said: he who wants your code, gets it.
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  18. #18
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Devilware.net
    How would that be done...?

    -Sam

    Put all your javascript in a file named .php

    Put a referrer list in there, and check referrers, so if it's not a certin domain name, it can't be downloaded and viewed...

    Then it's just <script language="Javascript" src="js.php"></script>

    I believe that would work.. but then again not sure, didn't bother to try it... but I would think it would.

    -Eric
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  19. #19
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about the copy of it that would be downloaded to your temporary internet files?

    -Sam
    Sam Hastings

  20. #20
    Non-Member coo_t2's Avatar
    Join Date
    Feb 2003
    Location
    Dog Street
    Posts
    1,819
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by hpnadig
    Is there any method using php by which I can hide my code ( HTML) from user. i.e to make it invisible on 'View Source'?
    Develop your own web browser that fetches html/javascript and then converts it to a proprietary format. You'd also have to write a parsing and rendering engine that works on the proprietary formatted code.
    Then you would have to have people download your special web browser so that your HTML page can be viewed.
    It's really not that difficult. I don't know why everybody says it is.

    --ed

  21. #21
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by coo_t2
    Develop your own web browser that fetches html/javascript and then converts it to a proprietary format. You'd also have to write a parsing and rendering engine that works on the proprietary formatted code.
    Then you would have to have people download your special web browser so that your HTML page can be viewed.
    It's really not that difficult. I don't know why everybody says it is. [img]images/smilies/rolleyes.gif[/img]

    --ed
    excellent idea...why didn't I think of that?

    -Sam
    Sam Hastings

  22. #22
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and brands you instantly as a clueless newbie fool.
    Wasn't it a newbie question originally huh ?

  23. #23
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Darn.... knew I forgot something

    Send a no-cache header lol
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  24. #24
    SitePoint Addict MarekS's Avatar
    Join Date
    Jan 2003
    Location
    Estonia / Tallinn
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can make the HTML bit harder to read for a human.

    For example, put it all on one line (replace "\n" with '') - stuff like that.

    But that's about it. Or... at least I would not go much further in "protecting" my HTML.

  25. #25
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zaire
    Put all your javascript in a file named .php

    Put a referrer list in there, and check referrers, so if it's not a certin domain name, it can't be downloaded and viewed...

    Then it's just <script language="Javascript" src="js.php"></script>

    I believe that would work.. but then again not sure, didn't bother to try it... but I would think it would.
    Of course, you could get around that in a second with cURL.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure


Bookmarks

Posting Permissions

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