Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test.php:
- <?
- // Put to environment variable "query string"
- putenv("QUERY_STRING=arg1=".urlencode("val1&&AAaaQAA")."&arg2=".urlencode("val2&&11AAAA"));
- // Run php script from shell in background, where we parse query string from env to GET array and then include file we want to exec
- exec("/usr/local/bin/php -e -r 'parse_str(\$_SERVER[\"QUERY_STRING\"], \$_GET); include \"xyest.php\";' > /dev/null 2> /dev/null &");
- ?>
- xyest.php:
- <?
- // Here we just test GET variable content by writing it to file and then sleep to check if script really runs in background
- $f = fopen("siska", "w+");
- fwrite($f, print_r($_GET, true));
- sleep(10);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment