Introduction: This is a detailed page for using PHP to call the tinyurl API. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 323144 'rolling = 'no'>
Tinyurl is a Web service that shortens the URL. You can change a long URL to a simple URL. Generally, you can create a tinyurl on its homepage, sometimes users automatically generate tinyurl on the client. Here we will introduce a method to use PHP to call tinyurl to generate a shortened address.
The PHP functions of tinyurl API are as follows:
Reference content is as follows: <? PHP Function tinyurl ($ U ){ Return file_get_contents ('HTTP: // tinyurl.com/api-create.php? Url = '. $ U ); } ?> |
The call example is
Reference content is as follows: <? PHP $ Url = 'HTTP: // www.william long.info /'; $ Tiny = tinyurl ($ URL ); Echo ('the tinyurl of "'. $ URL.'" is "'. $ tiny .'"'); Die (); ?> |
More articles about "using PHP to call tinyurl API"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/323144.html pageno: 16.