How can I make a CURL request to IP Address PHP? How can I make a CURL request to IP Address PHP? curl curl

How can I make a CURL request to IP Address PHP?


Try with:

curl_setopt($ch, CURLOPT_URL,"http://127.0.0.1/script.php");

and CURLOPT_POSTFIELDS sould be an array:

$data = array('postdata' => 'postdata', 'postdata1' => 'postdata1');curl_setopt($ch, CURLOPT_POSTFIELDS, $data);