avatar.alex Posted July 6, 2007 Share Posted July 6, 2007 OK I have a server on my computer its Eclipse MMO RPG (Massive Multilayer Online Roll-Playing Game) and I host it...to connect to the server you have to use and IP address from the host. When a account is created it creates it as a .ini file... I was wondering if there is anyway I can create a PHP file that if you sign up online it creates a .ini and sends it to the host computer.... say my username is avatar, and I created a profile online and it sends the file to C:\Documents and Settings\Alex\My Documents\Server\Accounts\ but some how it logs onto my IP address so it dosent send it to the Players accounts it sends it to the server on my computer is there a way to do that.... Is there a name for it also... Link to comment https://forums.phpfreaks.com/topic/58656-php-and-server/ Share on other sites More sharing options...
rcorlew Posted July 6, 2007 Share Posted July 6, 2007 that would be the FILES function in php http://www.tizag.com/phpT/files.php that should get you started Link to comment https://forums.phpfreaks.com/topic/58656-php-and-server/#findComment-290991 Share on other sites More sharing options...
avatar.alex Posted July 6, 2007 Author Share Posted July 6, 2007 Yeah this is kinda what I want but I would like it so I could create it like <form> <input type="text" name="username"><br /> <input type="password" name="password"><br /> <input type="password" name="repassword"><br /> <input type="email" name="email"><br /> <input type="text" name="charactername"><br /> </form> Ok now the account is set up like [GENERAL] Login=avatar Password=something [CHAR1] Name=avataralex Class= 1 Sex= 0 Sprite= 1 Level= 1 Exp= 0 Access= 0 PK= 0 Guild= Guildaccess= 0 Head= 0 Body= 0 Leg= 0 HP= 10 MP= 10 SP= 10 STR= 12 DEF= 5 SPEED= 3 MAGI= 0 POINTS= 0 etc... $myFile = "$_GET["username"].ini"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "[GENERAL]\n"; fwrite($fh, $stringData); $stringData = "Login=$_GET["username"]\n"; fwrite($fh, $stringData); $stringData = "Password=$_GET["password"]\n"; fwrite($fh, $stringData); $stringData = "[CHAR1]\n"; fwrite($fh, $stringData); $stringData = "Name=$_GET["charactername"]\n"; $stringData = "Class= 1\n"; fwrite($fh, $stringData); $stringData = "Sex= 0\n"; fwrite($fh, $stringData); $stringData = "Sprite= 1\n"; fwrite($fh, $stringData); $stringData = "Level=1\n"; fwrite($fh, $stringData); $stringData = "Exp=0\n"; fwrite($fh, $stringData); $stringData = "Guild=\n"; fwrite($fh, $stringData); $stringData = "Guildaccess=0\n"; fwrite($fh, $stringData); etc... fwrite($fh, $stringData); fclose($fh); Say I was at my friends house and I want to create a chracter, well when I did it sent the .ini into my computer where the server is Link to comment https://forums.phpfreaks.com/topic/58656-php-and-server/#findComment-291004 Share on other sites More sharing options...
avatar.alex Posted July 6, 2007 Author Share Posted July 6, 2007 is there a way I can log on to my IP address and through my IP address the code could send the files to my computer Link to comment https://forums.phpfreaks.com/topic/58656-php-and-server/#findComment-291425 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.