25.07.2012, 02:44
Una forma usando php seria guardando el dato que envias en un archivo de texto.
esto lo guardas con el nombre test.php
y esto como un fs, al escribir en la consola se envia el dato, para verlo tendrias que entrar a la direcciуn "127.0.0.1/test.php" (suponiendo que tenйs php instalado en tu pc)
esto lo guardas con el nombre test.php
PHP код:
<form method="GET">
<input type ="hidden" name="value">
</form>
<?php
$string = @$_GET['value'];
if(strlen($string)) {
$file = fopen("texto.txt","w");
fwrite($file,$string);
fclose($file);
}
else {
$file = fopen("texto.txt","r");
echo fread($file,1024);
fclose($file);
}
pawn Код:
#include <a_samp>
#include <a_http>
public OnRconCommand(cmd[]) {
new string[1024];
format(string,sizeof(string),"localhost/test.php?value=%s",cmd);
for(new i=0; i < strlen(string); i++) {
if(string[i] == ' ') {
string[i] = '%';
strins(string,"20",i+1);
i += 2;
}
}
HTTP(0,HTTP_GET,string,"","CallBack");
print(string);
return 1;
}