Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $url = "print.php";
  2.  
  3. $dados = array(
  4. "urlReturn" => $urlReturn,
  5. "numberOrder" => $numberOrder,
  6. "hashstring" => $hashstring,
  7. "amount" => $amount
  8. );
  9.  
  10. $string_campos = "";
  11. foreach ($dados as $name => $valor) {
  12. $string_campos .= $name . "=" . $valor . "&";
  13. }
  14. $string_campos = rtrim($string_campos."&");
  15. $ch = curl_init();
  16. curl_setopt($ch, CURLOPT_URL, $url);
  17. curl_setopt($ch,CURLOPT_POST,count($dados));
  18. curl_setopt($ch,CURLOPT_POSTFIELDS,$string_campos);
  19. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  20. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  21. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  22. curl_exec($ch);
  23. curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement