First sorry for my english (i'm french).
I'm working on a new project, a web project and i'm testing spider basic for be faster on the design.
My problem is i didn't success to user httpRequest function.
For exemple, i did a little script in php for manage user session but i'm not able to send information to the php script.
SpiderBasic
Code: Select all
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
Debug Result$
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
HTTPRequest(#PB_HTTP_Post, "http://127.0.0.1/pmu/php_post.php", "email=hello@world.fr, password=ThePassword", @HttpGetEvent())
Code: Select all
<?php
// define variables and set to empty values
$email = $password = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$email = test_input($_POST["email"]);
$password = test_input($_POST["password"]);
echo $name;
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>