SitePoint Sponsor |
|
User Tag List
Results 1 to 15 of 15
Thread: php syntax question
-
May 20, 2003, 11:15 #1
php syntax question
Can I take out all the carriage returns and spaces within my php pages to make it more "garbled" for others to try to edit and rip apart ?
Will the pages all still function properly is done on a global scale to all my php files in a particular site ?
I realize that there are proggies that make them very hard to edit - but - I just want it to be pretty hard to edit (i.e. no encryption).
Any suggestions, software recommendation, or tips appreciated.
Oznob
-
May 20, 2003, 11:17 #2
- Join Date
- Mar 2001
- Location
- Philadelphia, US
- Posts
- 2,205
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I can't think of anywhere this would affect execution except for inside strings, so go for it.
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure
-
May 20, 2003, 11:46 #3
- Join Date
- Jan 2003
- Location
- Calgary, Canada
- Posts
- 2,063
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sure, you could do like a search/replace, and change all newline characters to spaces, that would pretty much do what you want.
(although, if you are just talking about the PHP code, nobody can access that anyway, unless they have FTP access to your server)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.
-
May 20, 2003, 12:25 #4
They are going to have access to the FTP - and I know they will try to edit my code
I just want to make it a pain in the *** for them if (when) they do
Any tips on how (exactly) I can replace all the carriage returns with spaces ?
-
May 20, 2003, 13:06 #5
- Join Date
- Feb 2003
- Location
- Berlin
- Posts
- 370
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Despending of the editor You use, I should be possible to just copy a carriage return and do a find and replace (replace with nothing). Alternetivly write '\r' in the find part.
By the way, i don't know if there are PHP Editors, that can place carriage returns for better reading - like GoLive can rewrite a sourcecode and will put new carriage returns in the source...
Flözen
-
May 20, 2003, 13:36 #6
How do you copy a carriage return ?
Does /r work for this in all cases - or - only if /r is seen in the code.
-
May 20, 2003, 13:39 #7
- Join Date
- Sep 2002
- Location
- Kansas
- Posts
- 118
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you couldn't restrict access to certain files?
or keep copies of your code on hand to replace the edited files...
just a few other options.
-
May 20, 2003, 14:39 #8
its moreso a case of just making it hard on the guy (I wont go into details why).
(still need answer to /r question above)
-
May 20, 2003, 14:53 #9
- Join Date
- Jan 2003
- Location
- Calgary, Canada
- Posts
- 2,063
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
\r = mac newline
\n = unix newline
\r\n = windows newlineWho 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.
-
May 20, 2003, 15:11 #10
- Join Date
- May 2002
- Posts
- 90
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What your trying to do won't really make anything more difficult. I could open a page formatted like that and just point my cursor in the middle of the file and start typing. That's enough to destroy any script!
-
May 20, 2003, 15:13 #11
- Join Date
- Jan 2003
- Location
- Calgary, Canada
- Posts
- 2,063
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'd look more at getting the FTP accounts setup to not allow them to change any of your files.
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.
-
May 20, 2003, 15:46 #12
I dont care if they wreck the scripts - the scripts were purchased by the guy and were supposed to stay on my servers. After a huge battle he wants the scripts on his server so I am going to comply just to shut him up
--- I also know that he intends to reuse and sell these scripts which would take some of my other clients away from me.
Although I am not proficient in php yet I do know that he is less proficient than I - so I want to make sure that he has a tough time changing them around (but at the same time - I cannot really encrypt them cuz that just would be taking it a bit too far).
I have a utility called "HandyFile Find and Replace" which replace all instances of a string in multiple files.
I have all my files on my windows computer.
I want to replace "_______" with blank as I read above.
So correct me if I am wrong if I replace:
/r/n with "" (nothing)
this should do the trick ?
-
May 20, 2003, 15:51 #13
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
backslash! \r\n on windows, in editplus you can go to find-replace, check 'Regular expressions', if your file is written with win (PC) line breaks, you can do replace \r\n with (nothing), if you develop on linux you replace \n with (nothing), in editplus for example you can see what format the file is, it says in the bottom right corner (PC/MAC/UNIX)
- website
-
May 20, 2003, 17:19 #14
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I hope you charged him enough to make up for the clients he wants to take from you.
John
-
May 20, 2003, 18:57 #15
- Join Date
- Nov 2001
- Location
- Atlanta, GA, USA
- Posts
- 5,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Like people are saying, the best policy is to adjust your business dealings so that this is a non-issue. Easier said than done, perhaps.
Anyway, you could use this, I suppose: PHP Obfuscator/Obscurer ... not sure if that is too much for what you had in mind.Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
Bookmarks