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 the use of mysqli_real_escape_string() function?
What are the 5 types of variables?
How to remove white spaces from the beginning and/or the end of a string in php?
What happens when submit button is clicked?
Is c similar to php?
What are the difference between overloading and overriding in oops?
What is in a cookie?
How can you retrieve data from the mysql database using php?
Tell me are parent constructors called implicitly inside a class constructor?
Is php a float?
How can I find the width and height of an image resource?
2 Answers Rushmore Consultancy,
What is composer json?