0

PHP Curl always showing results without filling form or showing results while i am opening the page.

$curl = curl_init ();

curl_setopt($curl, CURLOPT_URL, $url);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);

curl_setopt( $curl, CURLOPT_AUTOREFERER, true );

curl_setopt($ch, CURLOPT_VERBOSE, FALSE );

curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60);

curl_setopt($curl, CURLOPT_TIMEOUT, 60);

echo curl_exec( $curl );

//print_r($result);


curl_close($curl);
B001ᛦ
  • 2,036
  • 6
  • 23
  • 31
  • 1
    Well, code you write without wrapping it into _any kind of condition_, executes every single time … what is surprising about that? – CBroe Jun 02 '21 at 14:11
  • I am new in php curl so please help how to add a condition – Praphaukar Raaj Jun 02 '21 at 14:16
  • Condition for _what_? You have not properly explained yet, _when_ you want this to trigger. Since you said “without filling a form”, would _that_ the “condition” then? Well do a bit of research then - type something like “php how do i check if form was submitted”, and get https://stackoverflow.com/questions/7711466/checking-if-form-has-been-submitted-php as one of the very first results. – CBroe Jun 02 '21 at 14:20

0 Answers0