subhomoy Posted March 7, 2012 Share Posted March 7, 2012 hiii i want to create a an api with one of my short url service but not able to do one.. The site only says Developer API API: http://abc.com/api.php?url=http://faceflow.com/ Responce: http://abc.com/2755 can any one give the code.. Any help will be appreciated... Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/ Share on other sites More sharing options...
gizmola Posted March 7, 2012 Share Posted March 7, 2012 A link to the API document would be a lot more helpful. Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1324761 Share on other sites More sharing options...
subhomoy Posted March 7, 2012 Author Share Posted March 7, 2012 @gizmola A link to the API document would be a lot more helpful. here is the link... http://torrentz.0fees.net/faq.php thanks... Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1324762 Share on other sites More sharing options...
gizmola Posted March 7, 2012 Share Posted March 7, 2012 API Our API allows you to provide short url functionality to any of your existing websites. Url Only To generate a url via the API, send a POST or GET request to the site in the following format: - http://torrentz.0fees.net/index.php?api=1&return_url_text=1&longUrl={URL} This site will then generate the short url and return it as plain text. i.e: - http://torrentz.0fees.net/a1 Generate & Redirect If you remove the return_url_text param the user will be redirected to the results page on this site instead of just the url text being returned. Extra Params: You can also set extra information on each short url, the supported params are: customUrl => Custom short url. shortUrlPassword => Password to access the url. shortUrlExpiryDate => Expiry date in the formay DD-MM-YYYY HH:II:SS. shortUrlUses => Total permitted uses before expiring. postToTwitter => Set to 1 to auto redirect to Twitter. NOTE: Any url requests via the API are subject to our normal spam protection measures and hence there may be limits to the amount of short urls that can be generated in any period. Seems fairly clear to me, that you simply need to pass one parameter: http://torrentz.0fees.net/index.php?api=1&return_url_text=1&longUrl= What you get in response is their shortened url in the body of an html document. You could use fopen() or the curl extension to do this in a script and get the response. Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1324775 Share on other sites More sharing options...
subhomoy Posted March 7, 2012 Author Share Posted March 7, 2012 What you get in response is their shortened url in the body of an html document. You could use fopen() or the curl extension to do this in a script and get the response. Can you plz plz give the source code. i know very little about php. or can you give the souce to find that code... Thanks in advance... Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1324783 Share on other sites More sharing options...
gizmola Posted March 10, 2012 Share Posted March 10, 2012 What you get in response is their shortened url in the body of an html document. You could use fopen() or the curl extension to do this in a script and get the response. Can you please please give the source code. i know very little about php. or can you give the souce to find that code... Thanks in advance... Sorry, but that is not what we do here. We help people who are trying to code with specific problems that they have, or advice on better approaches. We are not a free coding service. Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1325957 Share on other sites More sharing options...
trq Posted March 10, 2012 Share Posted March 10, 2012 ps; Double posting is also not what we do around here, don't do it. Link to comment https://forums.phpfreaks.com/topic/258441-can-anyone-help-me/#findComment-1326011 Share on other sites More sharing options...
Recommended Posts