I tried to load a specific div
of an external webpage into a specific div
of my website So I have used preg_match
function to get part of the code.
but I think that I write wrong pattern.
this is my code:
<?php
include("simple_html_dom.php");
$html = new simple_html_dom();
$url = "http://something.com/";
$page_all = file_get_contents($url);
preg_match('#<table id="table1"><table id="table1"><table id="table2">(.*)</table></table></table>#ms', $page_all, $div_array);
echo ($div_array[0]);
?>
I want to get content of the second table
with id=table2
in http://somthing.com
then it was'nt have any result.