I've figured out how to get the IP address written to the TXT file. I've also added a Read variable, but am still unsure how I can write to the TXT file when the user views their eCard for the first time.
Just add/update these lines in 'SendECard.php':
// note that $ip is also added to the EcardText string below
$ip = $REMOTE_ADDR;
// The default is that the user has not yet viewed the card
// This is what I want to turn to a "yes" once the user views the ecard
$Read = "no";
// added $ip and $read variables
$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=
Is there anyone out there that can help me write "yes" to the $Read variable in the the TXT file once the eCard is viewed?