spears47 Posted February 20, 2011 Share Posted February 20, 2011 What setopt variables would i need to set with this request? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/228245-curl-post-help-please/ Share on other sites More sharing options...
Minimeallolla Posted February 20, 2011 Share Posted February 20, 2011 I don't understand what you're asking. Quote Link to comment https://forums.phpfreaks.com/topic/228245-curl-post-help-please/#findComment-1177054 Share on other sites More sharing options...
spears47 Posted February 20, 2011 Author Share Posted February 20, 2011 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); Quote Link to comment https://forums.phpfreaks.com/topic/228245-curl-post-help-please/#findComment-1177074 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.