I'm trying to make a little database type thing with SCAR, simply by saving a string to a file using POST vars, and such.
my problem is that when i run the script, it doesn't send the POST var to the PHP...
SCAR Code:
program New;
const
Val = 'ohai';
var
i : integer;
s : string;
begin
I := InitializeHTTPClient(true, true);
AddPostVariable(i, 's', Val);
PostHTTPPageEx(i, 'http://akwardsaw.hostoi.com/Mess_Board.php');
s := getpage('http://akwardsaw.hostoi.com/Mess_Board.php');
writeln(s);
end.
Code:
<?php
error_reporting(E_ALL);
if (isset($_POST['s'])) {
$f = file_put_contents("./s.txt", $_POST['s']);
} else { echo "oops!"; }
echo file_get_contents("./s.txt");
?>
results when i run the SCAR script:
Successfully compiled (52 ms)
oops!Awkwardsaw: Test

PS: i put the "Awkwardsaw: test" in the text file myself when i made it