Capture PHP echo in Javascript
<p>I currently need to use a similar piece of PHP code. Modifying this code is not an option.</p>

<pre><code>&lt;?
session_start();

include '../connection.inc';

$conn = new Connection();

echo "ID:" . $conn-&gt;generateID();
echo "\n";
?&gt;
</code></pre>

<p>In connection.inc a connection to a database can be made by creating a new Connection(). From there, the database can generate a unique 16-character ID (conn->generateID).
Is there a way to retrieve to execute this PHP-file from javascript and extract the 16-character ID from the PHP-echo in javascript?</p>
