Jump to content

cURL Post help please


spears47
 Share

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

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.