POST method using curl

Post data to a url using CURL in PHP Simple Code :- <?php # Our new data $data = array( ‘user’ => 2, ‘pass’ => ‘2Test’ ); # Create a connection $url = ‘https://www.shivrajan.com/curl/get.php’; $ch = curl_init($url); # Form data string $postString = http_build_query($data, ”, ‘&’); # Setting our options curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, […]

Read More