Jump to content

cURL Post help please


spears47

Recommended Posts

I guess i mean. What is wrong with this? i havent worked much cURL. i need it to match the image above

 

all the variables are stated in the other parts of the code

 

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://testunst0p.com/index_user.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array (
        "Host: $sip",
        "Origin: $origin",
        "User-Agent: $ua",
        "Accept: $accept",
        "Referer: $referer",
        "Accept-Language: $lang",
        "Accept-Encoding: $encoding",
        "Pragma: $pragma",
        "Connection: $connection",
        "Content-Length: $length",
        "Content-Type: $type"
    ));

$data = array(
    'aut' => "$aut",
    'action' => '00101',
    'value1' => 'steve',
    'value2' => 'steve22',
    'value3' => 'steve22'
);

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.