harryoh / phurl

Automatically exported from code.google.com/p/phurl
0 stars 0 forks source link

API #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How do i set up API?

I have my own site and what to use my own shorturl to tweet my site news to 
twitter :)

Cheers

Original issue reported on code.google.com by flunky...@gmail.com on 24 Feb 2011 at 4:53

GoogleCodeExporter commented 9 years ago
There will be an official API in version 3, as there currently isn't one in v2. 
However, if you check back here within the next day, I will give you a basic 
API which I wrote for Phurl 2 but which was never released. Bear with me..

Original comment by he...@phurlproject.org on 25 Feb 2011 at 1:23

GoogleCodeExporter commented 9 years ago
Hi again, 

Here's a simple API for V2:
http://pastebin.com/raw.php?i=XPsAA2vp

Just copy the contents and save it as api.php in your main phurl directory.
Then to use it, it would be 
http://example.com/api.php?url=http://urlgoeshere.org/
I only did this quickly, and haven't really tested it, so if you find any 
issues let me know.

Henry

Original comment by he...@phurlproject.org on 25 Feb 2011 at 10:30

GoogleCodeExporter commented 9 years ago
Hi, In my site shortener the API not working http://s.jar.io/api.php?url=

for example in blog I use

//function.php wordpress
function get_short_url($url) {  
     $shorturl = file_get_contents("http://s.jar.io/api.php?".$url);  
     return $shorturl; 
     }

in blog theme call function:< ?php echo 
get_short_url(get_permalink($post->ID)); ? >
Then, not create shorturl. 

Original comment by fluxo.li...@gmail.com on 7 Jan 2013 at 11:04