Without using forms and hidden variables, how to send
variables from a PHP script to another URL using POST
method?
Answers were Sorted based on User's Feedback
Answer / lakhan lal
you can do it using curl
example:
<?
$URL="www.mysite.com/test.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://$URL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,
CURLOPT_POSTFIELDS, "Data1=blah&Data2=blah");curl_exec
($ch);
curl_close ($ch);
?>
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / suren
You can get the information from the following links.
http://www.php.net/manual/en/ref.mcrypt.php
http://www.phpuk.org/code.php
Is This Answer Correct ? | 1 Yes | 9 No |
Explain what is the difference between $var and $$var?
Explain what are psrs? Choose 1 and briefly describe it?
How can we submit a form without a submit button?
What is the timeout period on session values?
What is difference between Method overriding and overloading in PHP?
Can we use include ("xyz.php") two times in a php page "index.php"?
How to upload and play video in Php when u r in localhost?
Explain the difference b/w static and dynamic websites?
How does header() work . What do they tell the server same question for SESSIONS
Is php an array?
What is difference between variable declaration and variable definition?
Why do we use inheritance in php?