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 |
PHP can be used frontend of for backend?
Which function is used in php to delete a file?
How long will it take to learn php?
What is an operator in php?
Is runtime polymorphism overriding?
Why should I store logs in a database rather than a file?
What are the difference between echo and print?
In How many ways can u represent Not equal?Give Syntax of all ways..
Do you know what does $globals means?
Explain me what is the importance of "method" attribute in a html form?
Tell me how to find current date and time?
How many columns can be added in a table in mysql?