Welcome Guest ( Log In | Register)



3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> Protect Pages, HOW?
ewcreators
post Mar 23 2008, 11:10 AM
Post #11


Member [Level 1]
****

Group: Members
Posts: 59
Joined: 28-August 07
Member No.: 48,983



you can do it with javascript. Just create code for no right clicks.
but on the topic of php,
use $_SERVER[HTTP_ADDRESS](i am not sure if its this) to verify the ip adress. If its yours, then allow editing..etc, if its not, only allow displaying.
Go to the top of the page
 
+Quote Post
alex1985
post Mar 23 2008, 03:15 PM
Post #12


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



QUOTE(ewcreators @ Mar 23 2008, 03:10 PM) *
you can do it with javascript. Just create code for no right clicks.
but on the topic of php,
use $_SERVER[HTTP_ADDRESS](i am not sure if its this) to verify the ip adress. If its yours, then allow editing..etc, if its not, only allow displaying.


Can you rewrite it in more details? I did not get it! Sorry, I am beginner.
Go to the top of the page
 
+Quote Post
galexcd
post Mar 27 2008, 12:50 AM
Post #13


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,074
Joined: 25-September 05
From: Los Angeles, California
Member No.: 12,251



QUOTE(ewcreators @ Mar 23 2008, 04:10 AM) *
you can do it with javascript. Just create code for no right clicks.
but on the topic of php,
use $_SERVER[HTTP_ADDRESS](i am not sure if its this) to verify the ip adress. If its yours, then allow editing..etc, if its not, only allow displaying.


Thats a terrible solution. Not only do you make people not want to go to your website, but you don't protect anything. If you are talking about protecting your html code, that is impossible. When you load a website in your browser the server is actually sending that html code to the browser and the browser can read it. Just because there is some annoying script that blocks right clicks doesn't mean your computer still doesn't see it. Even if there was a way to use javascript to block the view source option under the view menu, you could technically still see it, you're only blocking the computer "noobs" if you will from seeing it. The source is still sent and if you are somewhat decent in programming you can still get it. NOW the reason you don't see php code in the source is because it is NEVER sent to the browser. It is compiled at the server and the OUTPUT is sent to the browser.

Now alex, I never have any idea what you want in your posts because they are never clear, and they are usually stupid and pointless questions, but I will try to explain this to you the best that I can. When you say some pages have "dsjdsb" at the end I assume you're talking about the get variable that is passed to them? It could also be an anchor but that doesn't change anything anyway. PHP has a very easy way of getting these variables with the $_GET array. It automatically fills this array for you, where the index is the variable name passed in the url and the value is, well, the value. Now there is no point in hiding the index.php that shows up, because it doesn't even look bad. I don't go to a website and say "OH THE WEBSITE URL HAS INDEX.PHP IN IT!!! OH MY GOD I BETTER GET OUT OF HERE". No I say "WOW THIS FREAKING WEBSITE HAS SOME KIND OF LAME JAVASCRIPT THAT PREVENTS ME FROM RIGHT CLICKING!!!! OH MY GOT I BETTER GET OUT OF HERE". So yes If you read the mod rewrite tutorials you may be able to do it. I'm not entirely sure but I think some browsers add the index.html or whatever when you navigate to a directory and don't put in the end slash. Example, point the browser to yoursite.com/images/ not yoursite.com/images
Go to the top of the page
 
+Quote Post
alex1985
post Mar 31 2008, 11:01 AM
Post #14


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



QUOTE(ewcreators @ Mar 23 2008, 03:10 PM) *
you can do it with javascript. Just create code for no right clicks.
but on the topic of php,
use $_SERVER[HTTP_ADDRESS](i am not sure if its this) to verify the ip adress. If its yours, then allow editing..etc, if its not, only allow displaying.


Who knows the exact code for it?
Go to the top of the page
 
+Quote Post
roooss
post Apr 20 2008, 02:08 AM
Post #15


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 25
Joined: 19-April 08
Member No.: 61,043



you can also try obfuscating your code and make it unreadable to everyone except yourself....
Go to the top of the page
 
+Quote Post
alex1985
post Apr 20 2008, 01:57 PM
Post #16


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



QUOTE(roooss @ Apr 20 2008, 06:08 AM) *
you can also try obfuscating your code and make it unreadable to everyone except yourself....


So, how can I do it?!
Go to the top of the page
 
+Quote Post
roooss
post Apr 20 2008, 03:12 PM
Post #17


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 25
Joined: 19-April 08
Member No.: 61,043



take a look at something like this

http://www.raizlabs.com/software/phpobfuscator/

if youre gonna do it i advise you read up a bit about it first because otehrwise see youre code obfuscation might give you a heart attack! lol

Here is a sample of what obfuscated code looks like...
function FC7321B391B6EF18F0711B835402E91D1($RE91192A00FF990477EE414AD5D708F08) { global $db_prefix; global $R695CD54D1F9CB31C11C71AF5EF74FDDB; $R9E9F3EDB7A84E99A0567F313F4EAC1BA = $RE91192A00FF990477EE414AD5D708F08; $R37A721F3B04CA577A7730084048F2BE3 = array_keys($R695CD54D1F9CB31C11C71AF5EF74FDDB); foreach($R37A721F3B04CA577A7730084048F2BE3 as $R90E8291866BD6CB7ED5089CE7E833D11) { $R9E9F3EDB7A84E99A0567F313F4EAC1BA = str_replace($R90E8291866BD6CB7ED5089CE7E833D11, $db_prefix . $R90E8291866BD6CB7ED5089CE7E833D11 , $R9E9F3EDB7A84E99A0567F313F4EAC1BA); } return $R9E9F3EDB7A84E99A0567F313F4EAC1BA;}.

heres another kewl tutorial to hide the fact that your using php altogether! take a peek

http://www.phpfreaks.com/forums/index.php/...c,186675.0.html

This post has been edited by roooss: Apr 20 2008, 03:33 PM
Go to the top of the page
 
+Quote Post
alex1985
post Apr 20 2008, 03:50 PM
Post #18


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



Thanks. That should help me a lot!!!
Go to the top of the page
 
+Quote Post
roooss
post Apr 20 2008, 05:25 PM
Post #19


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 25
Joined: 19-April 08
Member No.: 61,043



no problem glad i can help biggrin.gif

if u employ both php hiding and obfuscation not only do you get unreadable code but unreadle code with no sign of what language it is either! making it very very difficult for a would be script thief