- Home /
How to get Variable from Php Script?
i have a php with two variables in it. and i want to retrieve it into unity to display some information.
Debug.Log(phpinfo.text);
string[] inform = phpinfo.text.Split("/"[0]);
MenuItems[6].GetComponent<Text>().text = "Name:\t"+inform[0];
MenuItems[7].GetComponent<Text>().text = "Age:\t"+inform[1];
i tried spliting method, but the text takes everything from source file of the link..
It's pretty hard if we don't have an example of how you retrieve the Data or at least what Data you retrieve from php.
It should be pretty easy to parse the output and split it into different strings. But I can only help if I know how the php output is formated and how you retrieve it.
Chamakchallo i will suggest to use xml as output from server/php . so you can select data from it easily.if you want to go ahead in this way,i can help you .
@abi.kr01 i think i will use your method, i will ping u whenever i need help ,thank you
Your answer
Follow this Question
Related Questions
Saving a leaderboard using PHP and C#. 2 Answers
How to make a highscore database for unity? 1 Answer
WebHosting with phpMyAdmin PHP 0 Answers
Unity to PHP/MySQL: password and username security 1 Answer
MySql C# compiler error 0 Answers