Skip to content

Instantly share code, notes, and snippets.

@jorgejr568
Created June 26, 2016 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgejr568/f90d7b7c794a7cbfdd20f56054327c64 to your computer and use it in GitHub Desktop.
Save jorgejr568/f90d7b7c794a7cbfdd20f56054327c64 to your computer and use it in GitHub Desktop.
<?php
$ch=curl_init();
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$data=http_build_query(["auth" => "0a9a8d0852dac6bf4a0c70f06ca72009","tipo" => "sedex","formato" => "json","cep_origem" => "25264-148","cep_destino" => "01207010","cm_altura" => 10,"cm_largura" => 15,"cm_comprimento" => 13,"peso" =>386]);
curl_setopt($ch,CURLOPT_URL,"http://webservice.kinghost.net/web_frete.php?".$data);
$result=curl_exec($ch);
curl_close($ch);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment