Hello, I want to get ip + port from file into different variables.
By that I mean, i have a file called "ips.txt" and on first line, its:
1.1.1.1:27015
I want to get 1.1.1.1 into a variable let's say ip
and 27015 into variable port.
So ip = 1.1.1.1
port = 27015
Note that i will have more than one ip in file. an example:
1.1.1.1:27015
1.2.3.4:27055
PHP Code:
new filepointer = fopen(filename,"r")
if(filepointer)
{
new parsedip[32]
new readdata[128]
while(fgets(filepointer,readdata,127))
{
parse(readdata,parsedip,31)
}
fclose(filepointer)
}
This is all i could get from reading tutorials.