I want create a XML file from web page.I have site with for example this table
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Lastname</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/Surgery/web/app_dev.php/workers/13/show">13</a></td>
<td>aa</td>
<td>aaaa</td>
<td>aaaa</td>
</tr>
</tbody>
</table>
I tried something like that, but it doesn't work. How to load data from table in web page ?
$currentUrl = $this->getRequest()->getUri();
$domOb = new \DOMDocument();
$html = $domOb->loadHTMLFile($currentUrl);
I work on localhost and use Symfony2
EDIT:
I have problem after excecute this code
$currentUrl = $this->getRequest()->getUri();
$domOb = new \DOMDocument();
$xml = $domOb->loadHTML(file_get_contents($currentUrl));
I get
Warning: file_get_contents(http://
localhost
/Surgery/web/app_dev.php/test): failed to open stream: HTTP request failed! in
in php.ini I have allow_url_fopen = On