SitePoint Sponsor

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 25 of 91

Hybrid View

  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
    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

  7. #7
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Devilware.net

    Sorry, I'm not sure exactly what you mean here...would you mind clarifying?

    -Sam
    well, we won't be uploading the full size photo or Image, wright?
    One can sell his photo after just displaying the smaller size one..
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  8. #8
    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

  9. #9
    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.

  10. #10
    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



  11. #11
    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

  12. #12
    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

  13. #13
    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

  14. #14
    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

  15. #15
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    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.

    -Eric
    I've tried this before... But what do we do for preventing users from direcly accessing it? Can we chmod the file with no access to the public? Or would that mean even my page wouldn't have acces to it?
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  16. #16
    SitePoint Zealot marcoBR's Avatar
    Join Date
    Jun 2002
    Location
    Brazil
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Eric.Coleman
    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
    Hum... it seems have no sense if any user can access http://.../js.php (trusted http_referrer) and view the javascript sourcecode anyway or I didn't understand you exactly.

  17. #17
    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.

  18. #18
    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.

  19. #19
    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]

  20. #20
    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.

  21. #21
    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

  22. #22
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Devilware.net
    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
    Looks like something I posted a while back .

    In any case, no, you CANNOT protect your HTML/Javascript/CSS/Images/Flash files!!

    (Well flash to a certain extent, but there are flash decompilers.)
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  23. #23
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Lange
    Looks like something I posted a while back [img]images/smilies/wink.gif[/img].
    Probably is, actually

    -Sam
    Sam Hastings

  24. #24
    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.

  25. #25
    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


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
  •