Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



Without using forms and hidden variables, how to send variables from a PHP script to another URL u..

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

Without using forms and hidden variables, how to send variables from a PHP script to another URL u..

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

Post New Answer

More PHP Interview Questions

What is a php namespace?

0 Answers  


How to redirect https to http url and vice versa in .htaccess?

0 Answers  


How do you measure variables?

0 Answers  


What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods?

4 Answers   Ardo, Patni,


What is the difference between $message and $$message in php?

0 Answers  






What is the mysql injection?

0 Answers  


How do you format and output a number with leading zero's?

3 Answers  


What is the Pipe Symbol represented?

0 Answers  


What is exception handling in php?

0 Answers  


What are the methods to submit form in php?

0 Answers  


please explain me mail function in php

2 Answers  


how to hidden querystring url please send sample program

2 Answers  






Categories