Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. curl -X POST -H "user:myusername" -H "password:mypassword" "http://10.243.166.55:8080/CGRequestHandler/Controller?msisdn=8801631752133&vas_id=DFN0100001&trx_id=27859456800706&event_type=1&event_cost=2.44&product_name=beautytips&channel_code=SMS&content_id=&cp_id=DFNMEDIA&circle_id=DEL&opt1=DFNMEDIA&opt2=DFN0100001&opt3=-1&opt4=-1&opt5=-1&validity=1"
  2.  
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, $url);
  5. curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
  6. curl_setopt($ch, CURLOPT_POST, TRUE);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
  8. //curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  9. curl_setopt($ch, CURLOPT_HTTPHEADER, ['username:myusename,password:mypassword']);
  10. //curl_setopt($ch, CURLOPT_USERPWD, "DFN0100001:ZGZuQDE=");
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  12. curl_setopt($ch, CURLOPT_HEADER, TRUE);
  13. curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
  14. $result = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement