<?php function getShortURL($longUrl) { $url = "http://udanax.org/shorturl.jsp?mode=api&longurl="; $url .= urlencode($longUrl); $data = file_get_contents($url); $json = json_decode($data, true); return "http://udanax.org/".$json['shorturl']; } echo getShortUrl("http://lyricsbird.net/lyrics.php?title=%EC%9E%A1%EC%9D%8C&id=672169"); ?>
PHP로 Short URL API 사용하기
Short URL 서비스의 API를 이용하여 URL 줄이기는 AJAX/JQuery 를 사용하는 예제였는데, 아래와 같이 PHP로 간단하게 사용가능합니다. :)
Subscribe to:
Post Comments (Atom)
-
Opening the black box of Deep Neural Networks via Information - https://arxiv.org/pdf/1703.00810.pdf 지금까지 딥 러닝은 어떻게 동작하는지 이해할 수 없다고 믿어져왔다...
-
음성 인공지능 분야에서 스타트업이 생각해볼 수 있는 전략은 아마 다음과 같이 3가지 정도가 있을 것이다: 독자적 Vertical 음성 인공지능 Application 구축 기 음성 플랫폼을 활용한 B2B2C 형태의 비지니스 구축 기 음성 플랫폼...
-
As mentioned ago, I've been forming up the Hamburg project with Hyunsik Choi. Let's see more detail in the diagram of computing met...
No comments:
Post a Comment