mertcek123
Programmer
I need to get a contents of a div class from another website, I know the class name, I know the class ID, but couldn't find a working script. Can you help me? I used php but my people say that javascript is more better solution for this. This is the php script that I used.
<?php $conts = file_get_contents('
$pattern = '~<div.*.id="middle-column".*.class="productDetail_clearfix">(.*)</div>~iUs';
preg_match($pattern, $conts, $matches);
array_shift($matches);
echo $matches[0];
?>
<?php $conts = file_get_contents('
$pattern = '~<div.*.id="middle-column".*.class="productDetail_clearfix">(.*)</div>~iUs';
preg_match($pattern, $conts, $matches);
array_shift($matches);
echo $matches[0];
?>