Anyone with similiar result where the server:
Operating system Linux
Apache version 1.3.33 (Unix)
PHP version 4.4.0
Warning: fopen(http://url.com:8123/8105.csv): failed to open stream: Connection timed out in /public_html/csv.php on line 42
The PHP script, grabs a CSV file and display it in a table, reversed order ..
it was working up untill recently...
##
$max_recs = 40; // Number of rows to display
$recs = array();
$handle = fopen("http://url.com:8123/8105.csv", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$cnt = array_push($recs, $data); // Add one to end of array
if ($cnt > $max_recs) // More than the max?
array_shift($recs); // remove first entry in array
}
fclose($handle);
$recs = array_reverse($recs); // Reverse the order of array
for ($i=0, $num = count($recs); $i < $num; $i++) {
echo '<tr><td>call ', $i + 1, '</td>';
$data = $recs[$i]; // Just add this before your echo
echo "<td>" . $data[1] . "</td><td>" . $data[3] . "</td><td>";
}
##