php curl function to get web page content

         $url = 'https://allgoodsfree.com/how-to-add-fields-in-mysql-add-fields/';
             $paramToSign = array('leichengde'=>'ooo');
             $ch = curl_init ();
              curl_setopt ( $ch, CURLOPT_URL, $url );
              curl_setopt ( $ch, CURLOPT_HEADER, false );
              curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
              curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 120 );
              curl_setopt ( $ch, CURLOPT_POST, 1 );
              curl_setopt ( $ch, CURLOPT_POSTFIELDS, $paramToSign );
              curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, false );
              curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false );
              $data = curl_exec ( $ch );
              var_dump($data);

Leave a Reply

Your email address will not be published.

en_USEnglish