fork(1) download
  1. <?php
  2. $stdin = fopen ('php://stdin', "r");
  3. $stdout = fopen('php://stdout', "w");
  4. $html = stream_get_contents ($stdin);
  5.  
  6. $cleanHTML = strip_tags($html);
  7.  
  8. preg_match_all('/(?:(Latitude|Longitude) : ([\d\.]+))/', trim($cleanHTML), $matches, PREG_SET_ORDER);
  9.  
  10. foreach ($matches as $coordinate) {
  11. fwrite ($stdout, $coordinate[1] . ': ' . $coordinate[2] . PHP_EOL);
  12. }
Success #stdin #stdout 0.01s 20520KB
stdin
<div class="coordinates">
    <i></i>
    <strong>Latitude :</strong> 46.369384765625<strong>Longitude :</strong> 2.56929779052734</div>
</div>
stdout
Latitude: 46.369384765625
Longitude: 2.56929779052734