Advertisement
oquidave

pass to python

May 26th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. /*
  3. * pass arguments to a python script and fire it up from php
  4. */
  5.  
  6. $to = 'dokwii@smsmedia.info';
  7. $message = 'fireup up from php';
  8. $cmd = "python travelport_lib/sendmail.py '$to' '$message'";
  9.  
  10. //shell_exec($cmd);
  11. if (shell_exec($cmd)) {
  12. print "successfully fireup the python script";
  13. } else {
  14. print 'failed to fireup the python script';
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement