tail " . $URL . ""; ?> ' . ($i + 1) . '' . htmlspecialchars($lines[$i]) . "\n"; } ?>

">URL:" /> " /> " />

"; $PARSED_URL = (parse_url($URL)); // print_r($PARSED_URL); $CURLOPT_USERPWD = "{$PARSED_URL['user']}:{$PARSED_URL['pass']}"; // echo $CURLOPT_USERPWD; echo ""; $ch = curl_init(); $timeout = 5; // set to zero for no timeout curl_setopt ($ch, CURLOPT_URL, $URL); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt ($ch, CURLOPT_USERPWD, $CURLOPT_USERPWD); $file_contents = curl_exec($ch); curl_close($ch); // echo "
" . $file_contents . "
\n\n"; $lines = explode("\n", $file_contents); # Preserve the keys is important $lines = array_reverse($lines, "True"); $length = count($lines) - 1; echo "

Number of lines:" . $length . "

\n\n"; // echo "

Limit:" . $limit . "

\n\n"; $limit = $length - $limit; if ($limit < 1) { $limit = 0; } // if ($searchstring) { // echo "

Searchstring:" . $searchstring . "

\n\n"; // } echo ""; if ($searchstring) { echo "

Number of lines shown:" . $shown . "

\n\n"; } ?>