View Full Version : Database entry + UNIQUE URL

07-29-2011, 06:36 PM

I know the title is not very good but here it goes.

I plan on making a page that people can visit on the page i need there to be a text entry area that a user can post an embed code for there YouTube video,
YouTube Upon doing so, the user will have a unique URL given to them,

Say they input there details they will have a domain i.e www.dubstepground.com/video/1293

And i want this page to display there YouTube video that they entered,

What is the best way to do this?

I don't need them to log in or anything just so they visit page click create and it creates a new URL with there YouTube video embedded.

Thank you!
James Wright.

07-29-2011, 09:59 PM
You can do this with one table and some PHP (or whatever server side language you prefer) and mod_rewrite.

Though instead of letting them paste in the code for the embedded video, you should just take a link to the YouTube video and generate the embedded code yourself. Two reasons for this:

1) It will avoid you duplicating lots of data in your DB table.
2) Letting people just paste in HTML and having your server load it is just ripe for abuse by spammers