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 goto statement useful for?
Does php have a future?
we store and display scores of users in different games. In MySQL, records are stored as tuples (user-id, game-id, score). Now we need to support ranks of users, i.e., each user should be informed of his current rank in the community. The challenge is to come up with the best way to store the data in MySQL so that the requirements are efficiently met.
Do you know how to enable error reporting in php?
How to swap two variables without using 3rd temp variable.
Does jwt protect against csrf?
What is the use of mvc in php?
What is composer used for?
What is the scope of a variable defined in a function?
What is php artisan serve?
What are the encryption functions available in PHP?
How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using regular expression of PHP?