ruler1
MIS
- Feb 19, 2007
- 89
hi peeps, i was wondering if someone could help me.
im having difficulties extracting items from a text file and adding them to variables. the contents of the file below might give an idea of what i am trying to do...
this is a regular visitor:24.8.0.1-24.8.0.255
unknown visitor:124.80.0.1-124.80.0.255
top member:10.90.0.1-10.90.0.255
admin member:22.28.0.255-22.28.0.255
moderator member:22.27.17.11-22.27.17.11
i am trying to put each into a variable when reading through the file for example using something like below..
any idea's would be great because i just cant think of any way to do this. thank you in advanced
im having difficulties extracting items from a text file and adding them to variables. the contents of the file below might give an idea of what i am trying to do...
this is a regular visitor:24.8.0.1-24.8.0.255
unknown visitor:124.80.0.1-124.80.0.255
top member:10.90.0.1-10.90.0.255
admin member:22.28.0.255-22.28.0.255
moderator member:22.27.17.11-22.27.17.11
i am trying to put each into a variable when reading through the file for example using something like below..
Code:
$file = fopen("c:users.txt", "r") or exit("Unable to open file!");
while(!feof($file))
{
// (put info into $info):(put start IP1 into $ip1).(put start IP2 into $ip2).(put start IP3 into $ip3)....
}
fclose($file);
any idea's would be great because i just cant think of any way to do this. thank you in advanced