Advertisement
Guest User

curl_cep

a guest
Jan 16th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement