Hi guys I have been trying to work this ourt for some time now but am unsure what or where to go from here.
I am using a script i downloaded its grabs information over the web and displays it in my file.
<?php
// Get a file into an array. In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines = file('http://de.www.ivao.org/whazzup.txt');
// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {
echo"Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
}
?>
ouput looks like click here
Now this is a good amount of information with line numbers changing all of the time, an example would be something like.
Line #7 : UKV1122:194267:Michael Harich LOWL😛ILOT::48.1124:13.4826:8561:221:1/DH8C/M-SDRY/C:N0200:LOWL:F100:LOWS:IVANDE3:B:3:4600:0:50:0:I:1037:1037:0:0:0:0:LOWS::LNZ SBG:::::::20051013103316:IvAp:1.1.3:2:3::S:34
I am wishing to learn how to extract a spercific line's information, based on the UKV elements and would like to retrieve this information to show it on one line.
also I was wondering if it was possible to be more specific and only perhaps show certain elements of the line. i.e UKV1122,Micheal Harich,LOWL,F100,LOWS.
Line #7 : UKV1122:194267:Michael Harich LOWL😛ILOT::48.1124:13.4826:8561:221:1/DH8C/M-SDRY/C:N0200:LOWL:F100:LOWS:IVANDE3:B:3:4600:0:50:0:I:1037:1037:0:0:0:0:LOWS::LNZ SBG:::::::20051013103316:IvAp:1.1.3:2:3::S:34
So that I would be able to display all the lines based upon the fact that line contained the txt UKV and then grab bits of information according to that,
any help sugestions on what elements of php would be required to enable this would be great.
kind regards
and thanks for looking
Lee