SA-MP Forums Archive
PCP With Y_INI (using Ini with PHP) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: PCP With Y_INI (using Ini with PHP) (/showthread.php?tid=511505)



PCP With Y_INI (using Ini with PHP) - cr33d - 05.05.2014

Hi,
I have made 99% of the PCP for my server. Server is based on Y_Ini save acc system. Well now i tried multiply ways for converting Y_INI to MySQL and almost nothing worked. So i want to ask you how to call and read stats from player.ini file in PHP?
thank you.


Re: PCP With Y_INI (using Ini with PHP) - VladimirMark - 05.05.2014

I have heard about this situation long time ago
But I'm not sure If the system worked good
Better search for how to convert Y_Ini to MySQL

Or let ****** to post so you will be sure
Press the Rep+ Button If I helped you, please

Thanks


Re: PCP With Y_INI (using Ini with PHP) - cr33d - 05.05.2014

That is actuall problem. I have made the best solution for this with making one PHP file and a script with httpd include. But that thing sometime convert something or event nothing. I heard that it is possbile so i will se if ****** can help me with this.
Thank you Vladimir i appriciate you so i will give you rep+


Re: PCP With Y_INI (using Ini with PHP) - PinEvil - 05.05.2014

This is only possible if you had your webhosting on the same VPS as your server. And there's tons of MySQL tutorials out there, Use the search function.


Re: PCP With Y_INI (using Ini with PHP) - nickdodd25 - 06.05.2014

It is possible, might be a bit harder to set up but is defiantly possible as long as your have ftp access to your server.

PHP код:
$handle fopen("ftp://user:password@example.com/scriptfiles/users/username.ini""w"); 
http://www.php.net/manual/en/function.fopen.php

I also belive this would work too http://us1.php.net/function.file-get-contents

One of them two would probably be your best bet


Re: PCP With Y_INI (using Ini with PHP) - cr33d - 06.05.2014

But i want to read some part of the Y_INI file for example: Level and define it into variable How can i make it?
Is there any way to just make script that will post user stats into table (Just write not read)