Login Register


[RELEASE] URL Shortener API Script filter_list
Author
Message
[RELEASE] URL Shortener API Script #1
Today I'm releasing an API script to shorten URLS. You can make keys and distribute them to whomever.

Code:
<?php $keys = array("key1", "key2", "key3"); error_reporting(0); if ( !isset($_GET['url'], $_GET['key'])){ echo "Please provide all required variables!"; exit(); } // Check to see if provided key is not valid if ( !in_array($_GET['key'], $keys) ) { echo "Please provided a valid API key!"; exit(); } // Shorten URL $ur = @file_get_contents("http://my-x-api.tk/us/short.php?url=" . $_GET['url']); echo $ur; ?>

Just edit the "keys" array with the keys you would like other people to use, then call the API like:

Code:
http://yoursite.tld/phpfile.php?url=http://urlhere.com&key=APIKEY

Reply

RE: [RELEASE] URL Shortener API Script #2
Nice share for the community.

Reply

RE: [RELEASE] URL Shortener API Script #3
Wow nice release for the community!
[Image: xlbdwZT.png]

Reply

RE: [RELEASE] URL Shortener API Script #4
Thank you, this is a nice share!

I've been thinking of learning PHP actually.
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: [RELEASE] URL Shortener API Script #5
Great work man!

(07-22-2013, 10:18 PM)Xiledcore Wrote: Thank you, this is a nice share!

I've been thinking of learning PHP actually.

PHP is actually not hard and has a ton of features, learn it I'd say!

Reply

RE: [RELEASE] URL Shortener API Script #6
Agreed. I started learning PHP when I was about 13, and whipped up an entire forum platform within a year.
It's so widespread that you'll find no shortage of information. Not to mention it's the most highly sought after language for hiring companies...
[Image: tumblr_m73y8go3jd1rb7u8co1_500.gif]
Avatars are for faggots.

Reply

RE: [RELEASE] URL Shortener API Script #7
Very nice release! Keep up the good work!
[Image: 76561198073343560.png]

Reply

RE: [RELEASE] URL Shortener API Script #8
Very nice, thanks for sharing this!

Reply







Users browsing this thread: 1 Guest(s)