Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@praveenkumar-66Ze92 • Apr 12, 2011
You cannot pass it using a function. But you can do so using headers...
$host = "www.example.com";
$path = "/path/to/script.php";
$data = "data1=value1&data2=value2";
$data = urlencode($data);
header("POST $path HTTP/1.1\r\n");
header("Host: $host\r\n");
header("Content-type: application/x-www-form-urlencoded\r\n");
header("Content-length: " . strlen($data) . "\r\n");
header("Connection: close\r\n\r\n");
header($data); -
@praveenkumar-66Ze92 • Apr 13, 2011
You can also use CURL to post the data and get the response back, either in a variable or in the output buffer... 😀 -
@prasad-aSUfhP • Apr 15, 2011
A simpler method would be to say method="GET" in your form tag. That way all the form inputs would be submitted as a GET and not as a POST.
A more tedious approach to this would be to take the variables, encode them and then put that in the URL. -
@praveenkumar-66Ze92 • Apr 15, 2011
Dude, both are simpler... What he is asking is, without a client side interaction, he wants to post the data to another URL got it??? Even I had a same problem but I used header post... 😀kidakakaA simpler method would be to say method="GET" in your form tag. That way all the form inputs would be submitted as a GET and not as a POST.
A more tedious approach to this would be to take the variables, encode them and then put that in the URL. -
@manish-r2Hoep • Apr 15, 2011
Yes you are right ,but what i want to do is to pass variables to some url which user can' find to which page variables have been passedkidakakaA simpler method would be to say method="GET" in your form tag. That way all the form inputs would be submitted as a GET and not as a POST.
A more tedious approach to this would be to take the variables, encode them and then put that in the URL.
Anyway it has been done now with the use of curl