PHP curl to get and send static variable to URL -


i want send static values curl function. please correct me right syntax. values are

<input type=hidden name="cke" value="1"> <input type=hidden name="ownerid" value="2"> 

curl function:

$fields_string = [                  'cke'=> urlencode($post["1"])                 'ownerid'=> urlencode($post["6"])                 ]     foreach ($post $key => $value) {     $fields_string .= $key . '=' . $value . '&'; }   curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields, $fields_string); curl_setopt($curl, curlopt_returntransfer, true);  $response = curl_exec($ch); curl_close($ch); 

also, in next step want values html , post through curl function.

thanks


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -