How can I "fill" the varable $html with the contents from two files(locations), using the same function file_get_contents ?
Below is a part of the code that I use, it is working perfectly - I just need to collect the data from two web addresses (instead of one) and place it inside the variable $html
Any help will be hugely appreciated...
$html=file_get_contents('SOME-WEB-ADDRESS');
$pattern="|<tr[^>]+tip='D'>(.*)</tr+>|U";
preg_match_all($pattern, $html, $elements);
$MasterData=array();
foreach($elements[1] AS $ei => $element){
$pattern="|Model=(.*)'|U";
preg_match_all($pattern, $element, $Info);
$pattern="|<td+>(.*)</td+>|U";
preg_match_all($pattern, $element, $MultiData);
foreach($MultiData[1] AS $tdi => $Data)
$MasterData[$Info[1][0]][$tdi]=$Data;
}
foreach($Data AS $oznaka => $data1){[COLOR="Silver"][I]....and the code goes on.....[/I][/COLOR]


Sign In
Create Account

Back to top











