Answer the question
In order to leave comments, you need to log in
How does a link shortener work?
You need to write your own link shortener like goo.gl .
The link looks like this:
https://boggle.space/url
?edge=10
&letters="т","о","с","т","е","р","г","р","т","н","о","в","ь","ю","с","ш","о","т","о","а","з","н","о","н","ы","м","к","л","ш","и","л","л","р","г","м","н","я","н","н","а","у","о","о","г","н","е","л","е","о","б","д","т","е","и","п","о","с","т","о","о","с","и","в","л","г","ж","к","и","е","н","п","ц","к","и","о","м","л","л","а","а","а","й","с","о","а","а","у","а","а","л","д","х","а","ь","б","ж","у","в","е","о"]
&userwordsids=
Answer the question
In order to leave comments, you need to log in
It's simple:
- We generate a unique ID for the link
- We save this ID in the database along with the link
- When someone requests http://yoursite.ru/[ID] we get the link from the database that is tied to this ID and redirect.
Principal diagram:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question