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 |
What is use of mysqli_query in php?
Explain about the $_GET variable of PHP?
What is self in php?
What are the differences between session and cookie?
Php being an open source is there any support available to it?
How to generate a character from an ascii value?
How do you create an array in php?
What is the static variable in function useful for?
How can I embed a java program in php file and what changes have to be done in php.ini file?
Do you know what are traits?
What is strlen function in php?
How do you execute a php script from the command line?