开发者

Looking to pipe incoming mail with a script and grab contents and store them as variables

开发者 https://www.devze.com 2023-04-08 17:31 出处:网络
Us开发者_JAVA技巧ers will send a text message/email to text@domain.com in the form of #### killed #### and we need to take the first #### and store it as a variable, and then take the second #### and

Us开发者_JAVA技巧ers will send a text message/email to text@domain.com in the form of #### killed #### and we need to take the first #### and store it as a variable, and then take the second #### and store it as another variable.

I can't seem t find any relevant information online that shows what the context of a message looks like if the script were to read it. Any help would be greatly appreciated!


If you are trying to parse a message in a given format with PHP, you could try the following:

$text = "abc killed 123";
$tokens = explode(' killed ', $text);
print_r($tokens); // Prints [0] => abc, [1] => 123
0

精彩评论

暂无评论...
验证码 换一张
取 消