Advertisement
oquidave

pass to python

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