Jump to content

strings


ruler

Recommended Posts

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..

 

$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

Link to comment
https://forums.phpfreaks.com/topic/114986-strings/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.