http with php


I i'am using http to call to php file, there i want to load something, like 10 last killer names, and send again to my callback. I don't know how to make answer, i know need use echo, but if there 10 names, how to echo that? and how in callback get it values.

You could use JSON.

Like OsteeN said, you could use JSON. I made small script for you. This is how your php file could look like if you use JSON.

PHP код:
<table width="500">
        <td> Killer </td>
        <td> Weapon </td>
        <td> Player </td>
$json json_decode(file_get_contents("JSON URL"));
$json->kills as $data)
        if (
$i++ == 10) break;

Forum Jump:

Users browsing this thread: 1 Guest(s)