I am trying to execute a php mail script from my python code with two variables, but I don't know how to initiate that php script which is on a live server from my python code while entering two variables:
<?php
$sub= $_GET['sub'];
$mes= $_GET['mes'];
// send email
mail("test@gmail.com",$sub,$mes);
?>
and I want to try to fill in two variables by just calling the url within python script something like:
domain.com/text.php?sub=subject&mes=message
subject = My Subject is
message = My Message is
try:
ping.verbose_ping('domain.com/text.php?sub=subject&mes=message, count=3)
except subprocess.CalledProcessError:
print ("Couldn't get a ping.")
I tried to ping but its not working.