RE: Premature Ajax-ulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 1:17 PM -0500 8/3/07, Jay Blanchard wrote:

All of my PHP/Ajax functions are in one file (per application) with a
case for each one. I apply typical scrubbing to this too, so I never use
stuff as is either. I guess I could take the step of using php to
obscure the javascript code.

You really can't obscure the javascript code, but you can limit the code that can be seen by the user by sending commands back to the server and letting php do the work and then bringing the work product forward by displaying it via ajax.

The only stuff the user see's (if they want) is the typical ajax routine. Everything else is tucked nicely away in php scripts.

For example:

http://www.webbytedd.com/b/ajax-pics/

Everything is created on the back-end and then brought forward via ajax. The only thing the user can ever see is:

http://www.webbytedd.com/b/ajax-pics/a.js

And, that's pretty common.

It gets a bit more involved working with controls, like so:

http://www.webbytedd.com/a/ajax-controls/

If the user tried, he user could see this:

http://www.webbytedd.com/a/ajax-controls/ajax.js

But, none of the deeper php stuff will ever be seen short of failure somewhere.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux