Light URL Plugin Maybe?

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Light URL Plugin Maybe?
« on April 16th, 2012, 08:55 AM »
Hey guys,

I been making a new script called Light URL and was thinking that maybe it could come in use here as like a plugin or something.
I only been playing with it for 3 days and this is what I come up.
Sorry if I am not allowed to post links here, just remove my post if that's the case.
http://l-url.com/

Anyway.. This is all designed and coded by me from scratch!.
I am not professional but I been coding in PHP and learnt myself for some time now ;)
So I can do a lot XD
Basically I am looking to include an API for this and could possibly build it into the forums here so that you can have tiny links of all topics maybe?

The script I am making will work on ANY web server..
Requires Javascript and PHP.

Its still under development while I add more features and maybe fix bugs if I can find any lol..

Thanks for reading....
Star.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #1, on April 16th, 2012, 09:27 AM »
I think for auto-tiny urls it's best to offer something like:
Site.com/go/hash

Where hash would be a letter indicating content type (t for topic?) and the Id encoded to take less space (base64-like).
That would enable plugins to add more content types, too.

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Re: Light URL Plugin Maybe?
« Reply #2, on April 16th, 2012, 10:12 AM »
Quote from Nao on April 16th, 2012, 09:27 AM
I think for auto-tiny urls it's best to offer something like:
Site.com/go/hash

Where hash would be a letter indicating content type (t for topic?) and the Id encoded to take less space (base64-like).
That would enable plugins to add more content types, too.
Yeah that sounds like a good idea... If I understand correctly, Starting the hash off with T for topic then hash for unique ID.
This can be installed in any directory and will give the short URL stating that directory.
So having like site.com/go/T-774h would suit, if I got it right lol.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #3, on April 16th, 2012, 11:48 AM »
Yay another URL shortener.

If you're planning to offer something whereby sites can generate their own shortened URLs that don't rely on l-url.com (so that site.com makes site.com/go/hash automatically), you're going to have *SO* much fun with all the mutant configurations out there that won't support your routing scheme properly, especially given how hard it is to actually set up site.com/go/hash instead of site.com/go.php?hash...
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #4, on April 16th, 2012, 12:43 PM »
Quote from oOo--STAR--oOo on April 16th, 2012, 10:12 AM
Yeah that sounds like a good idea... If I understand correctly, Starting the hash off with T for topic then hash for unique ID.
Yes, and 'm' for the post ID, etc... (If we provide a post link shortener, obviously.)
Quote
This can be installed in any directory and will give the short URL stating that directory.
So having like site.com/go/T-774h would suit, if I got it right lol.
It would be site.com/go/t23 for site.com/?topic=127.0, or site.com/go/m1adC for site.com/?msg=277612, for instance. (This is based on a custom int-to-base62 encoding I've been testing secretly...)
Of course, it only saves 3 bytes even for a 6-byte-long post ID...
So I don't know if it's THAT cool in real conditions. But I certainly like having "/go/" because it perfectly complements the default "/do/" (which can be redefined) for action URLs ;)

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Re: Light URL Plugin Maybe?
« Reply #5, on April 16th, 2012, 08:14 PM »
Quote from Arantor on April 16th, 2012, 11:48 AM
Yay another URL shortener.

If you're planning to offer something whereby sites can generate their own shortened URLs that don't rely on l-url.com (so that site.com makes site.com/go/hash automatically), you're going to have *SO* much fun with all the mutant configurations out there that won't support your routing scheme properly, especially given how hard it is to actually set up site.com/go/hash instead of site.com/go.php?hash...
Bro,
I made this script myself using the idea for not having to rely on apache or a certain server configuration to generate a small URL, that will redirect users. As I use nginx... Reason for making my own.
Obviously you won't be relying on l-url.com as it would be installed on wedge.com

That's just a random "cheap" domain I purchased for me to have fun on coding it.
Yes its another short url, but yes its also different, and doesn't require require apache.




Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #6, on April 16th, 2012, 08:18 PM »
Well done for quoting my post but missing my point. It won't work on 'all' webserver as you quote.

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #9, on April 16th, 2012, 08:39 PM »
Quote from oOo--STAR--oOo on April 16th, 2012, 08:23 PM
Quote from Arantor on April 16th, 2012, 08:18 PM
Well done for quoting my post but missing my point. It won't work on 'all' webserver as you quote.
Feel free to correct me then on why?
Because IIS (without special configuration) and some configurations of Apache will not work the way you expect them to.

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Re: Light URL Plugin Maybe?
« Reply #10, on April 16th, 2012, 08:40 PM »
Quote from Arantor on April 16th, 2012, 08:39 PM
Quote from oOo--STAR--oOo on April 16th, 2012, 08:23 PM
Quote from Arantor on April 16th, 2012, 08:18 PM
Well done for quoting my post but missing my point. It won't work on 'all' webserver as you quote.
Feel free to correct me then on why?
Because IIS (without special configuration) and some configurations of Apache will not work the way you expect them to.
No quiet sure what you mean, but it doesn't use any rewrite/proxy_pass rules at all.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #11, on April 16th, 2012, 08:45 PM »
I know that, but there are circumstances where the incorrect query string won't be passed to PHP properly at all on those servers.

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Re: Light URL Plugin Maybe?
« Reply #12, on April 16th, 2012, 08:51 PM »Last edited on April 16th, 2012, 09:18 PM
Quote from Arantor on April 16th, 2012, 08:45 PM
I know that, but there are circumstances where the incorrect query string won't be passed to PHP properly at all on those servers.
Thanks for the clarification. I have not used all web servers. So will remember that.

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #14, on April 16th, 2012, 11:19 PM »
It's an interesting concept but I'm not sure plugins will behave cleanly with it, I suspect unless it's managed pretty much automatically they won't use it.

Mind you, most plugins will only use PURLs features that are managed automatically (very few plugins for SMF ever cared, and those that did, were pretty much portals and/or PURLs type plugins in the first place), so if it can be done transparently and 'just work', plugins can use it but otherwise they probably won't.