0

How to send DOM tree (including HTML, CSS, javascript) from a Php server to a client? Thanks.

Bahar S
  • 403
  • 3
  • 16
  • 2
    Your question doesn't seem to make a lot of sense. Your use of CAPTCHA as a comparison is not helping at all. – Rory McCrossan Apr 11 '12 at 19:21
  • Thanks for your comment Rory, I removed the example. Could you please tell me why it does not make sense? – Bahar S Apr 11 '12 at 19:25
  • It's not clear what you are trying to achieve. You need to tell us more about the project and what you want to do with php and jquery - and what your current solution are. – jack Apr 11 '12 at 19:26
  • I think it's because 'preparing a page in the server and sending it to the client' is how everything on the web works already - what is it you're trying to do? – Rory McCrossan Apr 11 '12 at 19:26
  • Thanks, I am trying to explain more clearly. – Bahar S Apr 11 '12 at 19:30

1 Answers1

0

EDIT: As I read the question again, I see that you're interested in concealing the source code, essentially. Being that this is a game, you will likely have tons of javascript/jQuery. If this is what you mean, you should research obfuscating javascript

Original Response:

I understand your question to ask whether or not you can "create" an "entire" page on the server, by running a combination of php, js, jquery, etc. If this is a correct interpretation, then the short answer is no. If it all is to be done server-side, you'd be better off using a server-side scripting language exclusively.

On a related note, you could dynamically generate the jQuery code on the server before sending to the client. I'm not sure that's what you're asking though, because the entire web is composed of pages that are created then sent to the user-side...

Community
  • 1
  • 1
orourkek
  • 2,091
  • 15
  • 22
  • Thanks orourkek. How to dynamically generate the jQuery code on the server? (After I edited my question and explained it more, did it make the question more clear?) Thanks. – Bahar S Apr 12 '12 at 02:54