I want to extract the version number of a webserver. the version number is showed on the admin login page.
i tried this:
$content = file_get_contents('URL/login.jsp'); preg_match("/<div class=\"product-version\".*div>/", $content); echo "content: $content";
It does show the version number but also a large part of the rest of the page.
part of the page i want to have preg_match look in:
<div class="product-logo" style="background-image:url(images/product/icon-system-admin.png)"> <div class="product-version">10.3</div> </div> </h2>
Is this possible? or to edit the preg_match to just use the 4 characters after product-version is found?