Skip to content

Instantly share code, notes, and snippets.

@gmilby
Created July 3, 2013 14:56
Show Gist options
  • Save gmilby/5918899 to your computer and use it in GitHub Desktop.
Save gmilby/5918899 to your computer and use it in GitHub Desktop.
'trying' to make a script to execute by script... definitely note safe, but it doesn't matter - it doesn't work :-P
<?php
function exec_local_url($url) {
exec('/usr/bin/wget -O - -q -t 1 "http://'. $_SERVER['HTTP_HOST'] .'/'
. addslashes($url) . '" >/dev/null 2>&1'
);
}
exec_local_url('php -S localhost:1000 -t .');
// exec(php -S localhost:1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment