Home >Backend Development >PHP Tutorial >Short URL api, URL compression, URL shortening

Short URL api, URL compression, URL shortening

WBOY
WBOYOriginal
2016-07-25 09:06:481050browse
http://qita.in/api.html
  1. $urls="http://qita.in/api.php?url=".$_POST['url'];
  2. $shorturls = file_get_contents($urls);
  3. $shorturls=trim($shorturls);
  4. $shorturls=iconv("UTF-8", "GB2312//IGNORE", $shorturls);
  5. echo $shorturls;
  6. ?>
  7. 网站:
复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn