rockhard Less Is More Apr 24, 2008 1,049 13 0 Jun 12, 2008 #1 Which is the best command to use if I need to execute a external script? File get contents seems unnecessary here... PHP: for($i = 0; $i < count($array); $i++) { $foo = file_get_contents($array[$i]); }
Which is the best command to use if I need to execute a external script? File get contents seems unnecessary here... PHP: for($i = 0; $i < count($array); $i++) { $foo = file_get_contents($array[$i]); }
F flyernati New member May 15, 2007 35 2 0 Jun 12, 2008 #2 You can use the exec function to execute scripts in PHP. Just be very careful not to have any way for a user to inject commands into that function call.
You can use the exec function to execute scripts in PHP. Just be very careful not to have any way for a user to inject commands into that function call.
K kyleirwin New member Jun 25, 2006 1,818 32 0 Jun 12, 2008 #3 put it in a password protected web accessable directory and... Code: $return = file_get_contents('http://username:password@domain.com/directory/script.php');
put it in a password protected web accessable directory and... Code: $return = file_get_contents('http://username:password@domain.com/directory/script.php');