spero ti possa aiutare, anche se ancora non ho capito cosa ci devi fare con le 2 righe...
Codice PHP:<?php
$lines=file('http://www.fisica.uniud.it:8080/locations/2172.html');
$low = false;
$hight = false;
foreach($lines as $line){
if(!$hight && preg_match('/High Tide$/',trim($line)) ){
$hight = $line;
}
if(!$low && preg_match('/Low Tide$/',trim($line))){
$low = $line;
}
if ($hight != false && $low != false) break;
}
echo $low."
";
echo $hight."
";
?>


Rispondi quotando