There is the tokenizer extension... http://www.php.net/tokenizer

This might give you a good start.

--
Peter James
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


----- Original Message ----- 
From: "Nikhil G. Daddikar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 1:06 AM
Subject: [PHP] Parsing PHP


> I am using PHP to develop and web app.
> 
> The app also has a scripting language for the *end user*. I was thinking 
> if I could expose a very simple subset of PHP to them (foreach, 
> if-then-else, variable assignments and comments) and then simply "eval" 
> it. But I don't want them to use calls like system or do infinite loops 
> etc. that will screw up the system.
> 
> I was thinking if I had a PHPparser that returns tokens, then I can 
> eliminate the call to unwanted funtions, etc.
> 
> Any ideas on how I should proceed?
> 
> Thanks.
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

Reply via email to