(solved! check EDIT:)I got http_get to work, it returned the information from my page as expected.
But I can't get http_post_string to work.
I can't even get the HTTP event to trigger.
I have this in my create event:
postString = ds_map_create()
ds_map_add(postString, 'submitForm', '1')
ds_map_add(postString, 'name', 'myName')
post[0] = http_post_string(my_url, ds_map_write(postString))
and my page looks like this:
<?php
if (isset($_POST["submitForm"]))
{
echo "name: " . $_POST["name"];
}
?>
<form action = "get_and.php" method = "post">
<input type = "text" name = "name">
<input type = "submit" name = "submitForm">
</form>I guess I don't understand how to build the ds_map and how to build the page to return the correct information.
EDIT:Lol... I've been reading this topic back and forth all night and I can't even remember what I have red...
IMPs post was very helpfull!
I've changed my create event to:
post[0] = http_post_string(my_url, 'submitForm=1&name=Charlie')
And my page looks like this:
<?php
if (isset($_POST["submitForm"]))
{
echo "name: " . $_POST["name"];
}
?>Notice that no <form> is needed, it's actually posted as a already filled form and not the needed inputs for a form, silly me
I'll keep the first part of this post if anyone happend to get as confused as I was.
Edited by filulilus, 13 May 2012 - 10:33 PM.