Skip to content

Instantly share code, notes, and snippets.

@clcneogeek325
Created May 10, 2018 15:27
Show Gist options
  • Save clcneogeek325/6500f48fdb506771009bd397e906c7e8 to your computer and use it in GitHub Desktop.
Save clcneogeek325/6500f48fdb506771009bd397e906c7e8 to your computer and use it in GitHub Desktop.
<?php
$post = array(
# Data Credentials
"user"=> "demo",
"passw"=> "demo",
);
$data = http_build_query($post);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://google.com");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
//file_put_contents($post["vucemCove"].".xml", $response);
echo "Resultado del CURL ".$response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment