Results 1 to 8 of 8

Thread: hiding code with php

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default hiding code with php

    In a contactform, lots of content/actions are written in php, but cannot be seen when looking at the source.
    Is it possible to hide coding from your content, but still visible/working online ?

    f.ex.: you see a link to a site online, but in the source you cannot see anything regarding this action.

    Is this possible ?

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Well, the simple answer would be: javascript. However, anyone with an understanding of javascript would be able to read it.

    You cannot "hide" html code server side while displaying it on the page because anything displayed on the page is no longer "server side"...it's now "client side." That html has been outputted by what is server side for the browser to read and alas, no longer server side.

    That's why javascript is the only option here, since javascript is client side. However, whenever you use client side scripting, all of it is viewable. Sure, there's some javascript tactics that you can do, but none of them are really worth it, I think. But I guess that's all up to you.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  3. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Just to see how it 'd look like: can you tell me more about the Javascript coding, please ?

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    there is absolutely unequivically no way of hiding html / javascript / digital media from a person after it has been published on the web, and the javascript used to give the designer a sense of security can be found all over the web, though from experience it really i just a waste of bandwidth and disk space. but google away

    //EDIT... added this after re-reading the original post
    ps. the reason php cannot be seen in the source is because it is processed on the server, and thus the browser has no knowledge of what happened. it is also the reason you need javascript AJAX to react with the server if you wish to not reload an entire page.
    Last edited by boogyman; 09-20-2007 at 01:31 PM.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    PHP is a program. It outputs html. You can "hide" the PHP code because it never was sent to the browser. But you can't hide that output.

    The HTML generated by PHP is very similar to the images generated from PHP. You can't get the PHP source code from those images, but you can most certainly save them, even if some form of "security" is implemented.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

  7. #7
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I dunno if this is correct, but you can hide media information with using
    mpu or theres other ones i can't think of.. but does mpu hide video and mp3 urls?
    Hey new design new look, goto xudas for personal webdsign help.. (:

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No. The URLs can be found inside the .mpu file (in fact, the .mpu file is just a text file with those URLs inside it; any idiot can open it up in Notepad or another text editor and find them).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •