Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Shortening URLs with the FFS.Im public API
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Jian" data-source="post: 286536" data-attributes="member: 6500"><p>I have recently thought of a new project, which is simply a URL shortener, but I plan to add more feature to its API in the future. The website is called FFS (wanted to make it catchy and easy to remember.) <u><a href="http://ffs.im" target="_blank">http://ffs.im/</a></u></p><p></p><p>Here's a simple PHP example on how to use the API</p><p>[PHP]function shorten($url) {</p><p> $call = file_get_contents('http://api.ffs.im/?url=' . $url);</p><p> $call = json_decode($call, true);</p><p> if( $call['result'] !== 0 ) {</p><p> return $call['result'];</p><p> } else {</p><p> return false;</p><p> }</p><p>}[/PHP]</p><p>The documentation for the API can be found <a href="http://ffs.im/api.php" target="_blank">here</a>.</p><p>I wrote the code on my mobile so it might have errors. Please tell me if it does, thanks.</p></blockquote><p></p>
[QUOTE="Jian, post: 286536, member: 6500"] I have recently thought of a new project, which is simply a URL shortener, but I plan to add more feature to its API in the future. The website is called FFS (wanted to make it catchy and easy to remember.) [U][URL='http://ffs.im']http://ffs.im/[/URL][/U] Here's a simple PHP example on how to use the API [PHP]function shorten($url) { $call = file_get_contents('http://api.ffs.im/?url=' . $url); $call = json_decode($call, true); if( $call['result'] !== 0 ) { return $call['result']; } else { return false; } }[/PHP] The documentation for the API can be found [URL='http://ffs.im/api.php']here[/URL]. I wrote the code on my mobile so it might have errors. Please tell me if it does, thanks. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Shortening URLs with the FFS.Im public API
Top