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 to write a program to make chess?
Does wordpress run on php 7?
How to include a file to a PHP page?
How to delete file in php?
What is the use of isset() in php?
What are php loops?
Is array a key php?
What are different types of runtime errors in php?
How can we know the count/number of elements of an array?
Does php 5 support exceptions?
Hello Friends,I am seeking for a job in php having 2yrs. exp.Please suggest any company openings.
Write an example to remove html tags from a string in php?