I am using a web-service (curl) to verify a value. Everything works fine despite the fact that I cannot store (and compare) the answer in a variable. I am using a PHP class (XY.PHP). So I send the request from AA. PHP and should get the answer there. Print_r($doc->firstChild->textContent) works fine but I cannot store the answer. Any Idea? Thanks in advance.
AA.php
require 'includes/XY.php';
...
 $verify->VerifyIt();
        if ($verify === "StatusCode:30") {
        $text = "<p> okay</p>";          
        echo $text;   }  
XY.php
...
$doc = new DOMDocument();
$doc->loadXML($result);
print_r($doc->firstChild->textContent);                 
return $doc->firstChild->textContent;