Answer the question
In order to leave comments, you need to log in
How to parse XML response from server?
In general, the task is to parse XML to a certain value.
The trick is that it comes in response to a request to the server and looks like this:
<init can_send_fuel='1' day='735440' user_agent=''><user default_car='59363292' tank='0' races_lost='0' gold='0' money='800' races_won='0' fuel_ts='1406212478' fuel_base='100' money_spent='3700''>
Answer the question
In order to leave comments, you need to log in
list($a, $b) = explode("default_car='", $xml, 2);
$default_car = intval($b);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question