How can the response message "Versandt OK 59 Restguthaben" be captured and stored in the PHP script?

To capture and store the response message "Versandt OK 59 Restguthaben" in a PHP script, you can use regular expressions to extract the desired information from the response. You can then store this extracted message in a variable for further processing or storage.

// Sample response message
$responseMessage = "Versandt OK 59 Restguthaben";

// Use regular expression to extract the desired message
preg_match('/Versandt OK (\d+) Restguthaben/', $responseMessage, $matches);

// Store the extracted message in a variable
$restguthaben = $matches[1];

// Output the stored message
echo $restguthaben;