Welcome to WebmasterWorld Guest from 34.239.158.107

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP to hide HTML code

I use Mock sites to show potential clients but I want to hide the code....

     
4:34 am on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2003
posts:134
votes: 0


I hope this can be done easily as I am not any good with PHP yet. I use a mock site to show potential clients what the site could look like and what they could do with their site.

Here is what I want to use PHP for; I want to use a PHP script to call up the index.html but not show the HTML code...just the text.

Do I need to just write the entire page with PHP?

I tried using an "include" statement with te HTMl files in the includes folder, however, the HTMl code is still visible when viewing the source.

I am guessing I may need to use a template script.

Shawn

4:56 am on Mar 13, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 19, 2002
posts:372
votes: 0


there's noway to hide HTML code

unless u designed your own browser and use encrypted transfer.(which may be cracked)

7:20 am on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 6, 2001
posts:99
votes: 0


Do you mean the PHP code? The post you left is a little confusing...

noSanity

8:16 am on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2003
posts:134
votes: 0


Do you mean the PHP code? The post you left is a little confusing...

I was afraid of that! I guess what I am trying to accomplish is what you see when you view the source of the page ...you do not see any of the mark up language just plain text.

Similar to what you would see if you use PHP to dispay time and date on a page - if you view the source the time and date is plain text - you do not see the PHP code used to generate it.

This may not be possible but I figured this would be the place to find out!

Shawn

11:55 am on Mar 13, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 4, 2000
posts:446
votes: 0


html *is* plain text... Not displaying the html that makes up a page wouln't display that page.

Could you not put that in your terms for supplying a demo site.. After all, its *your* website, so if the client tries to copy the site then wouldn't that be breach of copyright?

And if they want to copy a site design to save money, why would you want such a client?

12:12 pm on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 14, 2002
posts:118
votes: 0


If you just want to show what the site owuld look like, you could just use an image with a watermark.

Allen

8:19 pm on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 6, 2001
posts:99
votes: 0


So I am still confused. Are you saying that when you view the source, you see:

<?

echo "Echo this string";

?>

or are you saying you don't want people to see:

<html>
<head>
--snippit--
</body>
</html>

noSanity

9:33 pm on Mar 13, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2003
posts:134
votes: 0


And if they want to copy a site design to save money, why would you want such a client?

It's not the clients I am worried about - it's the other local guy(s).
I would rather avoid any issues that may arise out of copyrighted work - my attorney makes enough money now :)

So I am still confused. Are you saying that when you view the source, you see:
<?

echo "Echo this string";

?>

If that is all they see with view source that would work. I guess they could still download the images etc.... I may just go back to watermarks. I was maybe thinking there would be a way not to use watermarks.

Maybe going back to watermarks and ending this thread is a good idea - that way I do not have a handful of people scratching their heads saying "What the? is this guy talking about?" :)

2:31 am on Mar 14, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Mar 8, 2003
posts:234
votes: 0


Hey Shawn,
I understand what you were trying to conceptualize (i think) Kinda what happens when a spider tries to index a framed site. Kinda the same as when php is run, you are trying to find a way to run the html some where else and only show the results on the screen. I think this is what you are getting at kinda. I would have no idea how to do something like that. I would think it could be done. Maybe an applet or something. Thats all i got for ya. Sorry i couldn't be of more help.
2:47 am on Mar 14, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2001
posts:926
votes: 0


Shawn - I'm putting down a complete list here of issues related to web development security - I think the first is your scenario.

If you want to stop your clients competitors viewing in development pages:
- put the new pages in a subdomain or subdirectory and protect with .htaccess usernames and passwords.

If you want to stop your own client stealing your designs at initial stages
- watermarked images - though the design can still be reverse engineered.

If you want to stop competitors stealing your designs from live sites.
- sorry - no way to do this.

If information is highly sensitive and you don't want anyone to be able to save the contents
- write a flash application that will only run on a given server.
- caveat: screenshots are always available.

HTH

2:55 am on Mar 14, 2003 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


Welcome to WebmasterWorld The_Hat
4:52 pm on Mar 14, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2003
posts:134
votes: 0


Hey Shawn,
I understand what you were trying to conceptualize (i think) Kinda what happens when a spider tries to index a framed site. Kinda the same as when php is run, you are trying to find a way to run the html some where else and only show the results on the screen. I think this is what you are getting at kinda. I would have no idea how to do something like that. I would think it could be done. Maybe an applet or something. Thats all i got for ya. Sorry i couldn't be of more help.

Thats exactly what I wanted to do - I will just go back to watermarks for now.

5:07 pm on Mar 20, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 20, 2003
posts:3
votes: 0


Hi,

If your web page has both HTML and PHP code, then the PHP gets parsed on the server side, and the HTML part will be downloaded to the client side (browser).

Without that, your visitor cannot see the page.

However, if you're worried about someone stealing your web page code, like JavaScript etc, though I don't think it's worth worrying about (because almost anything that you see on the web can be stolen - those who know how to do it probably won't need to steal your code - they'll know how to do it themselves :-)

So, if it's on the web, it can be stolen.

However, if you want to prevent more than 90% of the general population from stealing HTML or Javascript code, or even image locations (URL's) from your web site, then you could use something like the <snip>

Regards,

Ravi

[edited by: jatar_k at 5:23 pm (utc) on Mar. 20, 2003]
[edit reason] no sigs, personal urls TOS [webmasterworld.com] [/edit]

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members