This is kinda clunky, but what you can do is dynamically rewrite the code,
replacing calls to mysql_query with mysql_query_user.
Add this snippet to the beginning of your code:
if(!$eval) {
function mysql_query_user() {
$args = func_get_args();
print_r($args);
call_user_func_array('mysql_query', $args);
}
$eval = true;
$code = file_get_contents($_SERVER['SCRIPT_FILENAME']);
$code = preg_replace('/(?<=\\s)mysql_query\\s*\\(/', 'mysql_query_custom(',
$code);
eval("?>$code");
exit();
}
This won't work, of course, if the call to mysql_query is buried in an
included file.
Uzytkownik <so*****@somedomain.com.invalid> napisal w wiadomosci
news:bt**********@nsnmrro2-gest.nuria.telefonica-data.net...
I want that every time the built-in 'mysql_query' function is called
another user function is also called. But i can't call the user function explicitly, I can only call the
built-in function.
Any idea?
Much thx in advance.