Advertisement
Guest User

Untitled

a guest
May 28th, 2017
709
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. curl_setopt($ch, CURLOPT_URL, "https://www.cibconline.cibc.com/ebm-anp/api/v1/json/sessions");
  2. //curl_setopt($ch, CURLOPT_PROXY, $proxys);
  3. curl_setopt($ch, CURLOPT_HEADER, 1);
  4. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36');
  5. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  8. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  9. curl_setopt($ch, CURLOPT_COOKIESESSION, true);
  10. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/vnd.api+json','Connection: keep-alive','Client-Type: default_web', 'X-Auth-Token: null', 'brand: cibc', 'WWW-Authenticate: CardAndExpiryDate', 'X-Requested-With: XMLHttpRequest'));
  11. curl_setopt($ch, CURLOPT_COOKIEJAR, '/buysub.txt');
  12. curl_setopt($ch, CURLOPT_COOKIEFILE, '/buysub.txt');
  13. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  14. curl_setopt($ch, CURLOPT_POST, 1);
  15. curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
  16. $a = curl_exec($ch);
  17. // echo $a;
  18.  
  19. if (strpos($a, '"transactionId":') !== false) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement