'Buck-a-roo') { exit; } // Get Message Details from the Session Variables from SMS Gateway $MsgSid = $_REQUEST['MessageSid']; $AccountSid=$_REQUEST['AccountSid']; $MsgFrom=$_REQUEST['From']; $MsgTo=$_REQUEST['To']; $MsgBody=$_REQUEST['Body']; // Strip the Plus Sign off the Phone Number for User ID field. list ($Nothing, $UserID) = explode("+", $MsgFrom); // Log Message Transactions (json) // Add support for up to ten media attachments to the message. 1-26-25 MF $json = '{"UserID":"' . $UserID . '","TimeStamp":"' . $timeStamp . '","EZdate":"' . $ezdate . '","UNIXepoch":"' . $Udate . '","MessagegSid":"' . $_REQUEST['MessageSid'] . '","AccountSid":"' . $_REQUEST['AccountSid'] . '","MsgFrom":"' . $_REQUEST['From'] . '","MsgTo":"' . $_REQUEST['To'] . '","$FromCity":"' . $_REQUEST['FromCity'] . '","$FromState":"' . $_REQUEST['FromState'] . '","$FromZip":"' . $_REQUEST['FromZip'] . '","$FromCountry":"' . $_REQUEST['FromCountry'] . '","$ToCity":"' . $_REQUEST['ToCity'] . '","$ToState":"' . $_REQUEST['ToState'] . '","$ToZip":"' . $_REQUEST['ToZip'] . '","$ToCountry":"' . $_REQUEST['ToCountry'] . '","$Body":"' . $_REQUEST['Body'] . '","$NumMedia":"' . $_REQUEST['NumMedia'] . '","$MediaUrl0":"' . $_REQUEST['MediaUrl0'] . '","$MediaContentType0":"' . $_REQUEST['MediaContentType0'] // Disable looking for more media URL's // You can only attach a single reel to a text message - 2-9-25 MF // . '","$MediaUrl1":"' . $_REQUEST['MediaUrl1'] // . '","$MediaContentType1":"' . $_REQUEST['MediaContentType1'] // . '","$MediaUrl2":"' . $_REQUEST['MediaUrl2'] // . '","$MediaContentType2":"' . $_REQUEST['MediaContentType2'] // . '","$MediaUrl3":"' . $_REQUEST['MediaUrl3'] // . '","$MediaContentType3":"' . $_REQUEST['MediaContentType3'] // . '","$MediaUrl4":"' . $_REQUEST['MediaUrl4'] // . '","$MediaContentType4":"' . $_REQUEST['MediaContentType4'] // . '","$MediaUrl5":"' . $_REQUEST['MediaUrl5'] // . '","$MediaContentType5":"' . $_REQUEST['MediaContentType5'] // . '","$MediaUrl6":"' . $_REQUEST['MediaUrl6'] // . '","$MediaContentType6":"' . $_REQUEST['MediaContentType6'] // . '","$MediaUrl7":"' . $_REQUEST['MediaUrl7'] // . '","$MediaContentType7":"' . $_REQUEST['MediaContentType7'] // . '","$MediaUrl8":"' . $_REQUEST['MediaUrl8'] // . '","$MediaContentType8":"' . $_REQUEST['MediaContentType8'] // . '","$MediaUrl9":"' . $_REQUEST['MediaUrl9'] // . '","$MediaContentType9":"' . $_REQUEST['MediaContentType9'] . '"}' . "\n"; // All Alerts Log Record $filename = 'alerts'; $logfile = fopen( $filename . '.json' , 'a'); fputs($logfile,$json); fclose($logfile); // LINES Log 10-21-23 MF $filename0 = $_REQUEST['From']; $userfile = fopen('./LINES/' . $filename0 . '.json' , 'a'); fputs($userfile,$json); fclose($userfile); // "View" the NUPicture (7-25-24 MF) $filename1 = 'NUpicture'; $pictfile = fopen( $filename1 . '.json' , 'w'); fputs($pictfile,$json); fclose($pictfile); // Reels Log Record ( 3-26-25 MF ) $filename2 = './.wk/Reels'; $wkfile = fopen( $filename2 . '.json' , 'a'); fputs($wkfile,$json); fclose($wkfile); exit; ?>