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 can you create a session in php?
What is php's mysqli extension?
What does $_files means?
What are the different ways we can retrive the mysql results using php ? Explain each
What is putenv?
What is a trait in php?
Explain why would we use === instead of ==?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
Explain what does $_files means?
What is escaping to php?
How to get ip address of clients machine?
how can refresh current page automatically, without press any button and anchor tag.