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 |
how we can retrive data in pdf along php mysql?
What is final keyword in php?
How I use global variable in another page without using $_GET method?
Why many companies are switching their current business language to php?
Is overloading possible in php?
How to get number of days between two given dates using PHP?
What is the method to execute a php script from the command line?
Tell us how can we display the output directly to the browser?
write function of the sentence traversal passing the parameter, e.g input:this is input sentence. output:sentence input is this.
Write a PHP code to print following number pattern: 123 456 789
What is difference between strstr() and stristr()?
Does strlen include null?