I have my own link shortening website, shten.me. It has an api that can be used and I was wondering how I would go about making a mod that automatically shortens URL's put in the body of a thread. How would I do that? And could anyone do it? I am not very good with PHP at all, or mods.
Little more info: The API works likle this: Navigating to this url http://shten.me/yourls-api.php?signature=SECRETKEY&action=shorturl&format=simple&url=www.exampleurl.com shortens the www.exampleurl.com and returns it as a text value in the page.
I'm curious, what's the benefit of using a link shortener? Saving a small (often irrelevant) amount of space in the database, and instead able to hide any link you link in them.
Just as a heads-up, I once demonstrated a glaring security hole in an online game using link shorteners. Imagine a roleplay game where you click a link to unequip an item, then another link to sell the item back to the game. Put said links into link shorteners and send a booby-trapped PM, job done, user is screwed over. (Whereas the forum will not allow image links that contain the forum URL with any action, except the action for attachments. This bypasses that restriction.)
I always thought link sh0rteners are dying breed. Whatever happened to tr.im?
Lainaus käyttäjältä: Arantor - tammikuu 23, 2012, 05:09:10 IP
I'm curious, what's the benefit of using a link shortener? Saving a small (often irrelevant) amount of space in the database, and instead able to hide any link you link in them.
Just as a heads-up, I once demonstrated a glaring security hole in an online game using link shorteners. Imagine a roleplay game where you click a link to unequip an item, then another link to sell the item back to the game. Put said links into link shorteners and send a booby-trapped PM, job done, user is screwed over. (Whereas the forum will not allow image links that contain the forum URL with any action, except the action for attachments. This bypasses that restriction.)
There's no real benefit I just wondered how I'd do it, one for my own learning curve, and secondly so my service is used a little more on my own forum.
If you use whatever service, and they happen to go out of business, then all your short links are screwed. They will go to a 404.
Lainaus käyttäjältä: bluedevil - tammikuu 23, 2012, 05:14:36 IP
If you use whatever service, and they happen to go out of business, then all your short links are screwed. They will go to a 404.
I don't need to worry about that, it's my service so I'll make sure it doesn't.
Lainaus käyttäjältä: Arantor - tammikuu 23, 2012, 05:09:10 IP
I'm curious, what's the benefit of using a link shortener? Saving a small (often irrelevant) amount of space in the database, and instead able to hide any link you link in them.
Just as a heads-up, I once demonstrated a glaring security hole in an online game using link shorteners. Imagine a roleplay game where you click a link to unequip an item, then another link to sell the item back to the game. Put said links into link shorteners and send a booby-trapped PM, job done, user is screwed over. (Whereas the forum will not allow image links that contain the forum URL with any action, except the action for attachments. This bypasses that restriction.)
Arantor, I saw you helped with this mod, http://custom.simplemachines.org/mods/index.php?mod=2986, how hard would it be to do something like that with my service?
It should work with your forum. At the package list in admin, bottom right, click on "advanced" and type smf 2.0 and save. Then install the mod.
Eh, I don't remember but it wasn't a lot of help I gave (bearing in mind it's a third party service and has an established API, and Suki's a competent coder)
*shrug* Thing is, if you're capable of writing a URL shortener, I'm not sure what help you need integrating it in SMF.
Lainaus käyttäjältä: Arantor - tammikuu 23, 2012, 05:28:34 IP
Eh, I don't remember but it wasn't a lot of help I gave (bearing in mind it's a third party service and has an established API, and Suki's a competent coder)
*shrug* Thing is, if you're capable of writing a URL shortener, I'm not sure what help you need integrating it in SMF.
The actual back service behind it is not coded by me, I have just made the public interface, so I'm not too good if I'm honest.
Lainaus käyttäjältä: Arantor - tammikuu 23, 2012, 05:28:34 IP
Eh, I don't remember but it wasn't a lot of help I gave (bearing in mind it's a third party service and has an established API, and Suki's a competent coder)
*shrug* Thing is, if you're capable of writing a URL shortener, I'm not sure what help you need integrating it in SMF.
Got it to work! :D:D:D:D