21.08.2015, 01:18
Um exemplo:
Time.php:
O que vai ser mostrado na console do SAMP: (exemplo)
PHP код:
#include <a_samp>
#include <a_http>
public OnFilterScriptInit()
{
HTTP(0, HTTP_GET, "oseuhost.com/time.php", "", "HttpResponse");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
forward HttpResponse(index, response_code, data[]);
public HttpResponse(index, response_code, data[])
{
printf("return do script: %s", data);
}
PHP код:
<?php
date_default_timezone_set('Europe/Lisbon');
$date = date('d/m/Y H:i:s ', time());
echo $date;
?>
Код:
return do script: 21/08/2015 02:17:12