Posted By

jrobinsonc on 08/10/10


Tagged


Versions (?)

Función para acortar URLs con PHP y TinyURL


 / Published in: PHP
 

  1. <?php
  2. function acortar_url($url){
  3. $apiurl = "http://tinyurl.com/api-create.php?url=".$url;
  4. $url_corta = file_get_contents($apiurl);
  5. return $url_corta;
  6. }
  7. //Ejemplo de uso
  8. echo acortar_url("http://www.webintenta.com");
  9. ?>

Report this snippet  

You need to login to post a comment.