Jump to content

robc3129

New Members
  • Posts

    1
  • Joined

  • Last visited

robc3129's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Have you tried CURL? I usually use CURL to make API requests. $url = ' http://web2sms.cosmote.gr/web2sms/DCM'; $fields = array( 'U' => urlencode($_POST['Username']), 'P' => urlencode($_POST['Password']), 'A' => urlencode($_POST['WEB2SMS']), 'U' => urlencode($_POST['username']), 'ACCOUNT' => urlencode($_POST['AccountName']), 'L' => urlencode($_POST['Language']) ); //Convert the data into a value URI foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch);
×
×
  • 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.