Guest User

curl_cep

a guest
Jan 16th, 2014
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. @header( 'Content-Type: text/html; charset=iso-8859-1' );
  3. $cep = $_POST['cep'];
  4. $url = "http://xtends.com.br/webservices/cep/json/$cep/";
  5. $ch = curl_init();
  6. curl_setopt ($ch, CURLOPT_URL, $url);
  7. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  8. echo curl_exec($ch);
  9. curl_close($ch);
RAW Paste Data