PHP script to fiddle with a YOURLS URL
Budget: $30 – $250 USD
YOURLS is Your Own URL Shortener, like Bitly. If you don't know what YOURLS is, go to YOURLS.org. It has an API that can be used for this.
Please note: I am a software developer myself with 40+ years of experience. I know PHP and could do this myself, I just don't want to. I'm trying to learn how to effectively outsource projects, and this seems like a fairly simple one I need done.
BACKGROUND
Suppose you want to use a service that lets you provide a URL to an image or a website, but you think you might want to change it in the future. However, the site forces you to go through somebody to make changes. What you need is the ability to set up a redirect, like bitly. But most free services either don't let you edit the target URL (ie, where it goes to), or they limit you to how many times you can edit it before you have to pay. So you decide to set up your own YOURLS site, and use that.
USE-CASE / REQUIREMENTS
I have a service that needs me to provide URLs for my clients for some stuff, and I don't want to have to deal with changing their links on the back-end; I want them to be able to do that themselves. So I want to set up a YOURLS site, create a redirect for them, use a default link as the original target, then put the short link into the field that needs one, like their website or logo or headshot image. This is currently not a problem.
What I want is to be able to give them a link on a help page that goes to a short PHP script that you will write that opens a form and asks for this data:
some ID field (something they know)
the Short URL Name (something I'll give them)
the Target URL they want that short name to point to (a TEXT field)
There will be a [Test], [Save] and [Cancel] buttons on the form.
The client/customer never has access to the YOURLS script. Only I do. They can change the Target URL of any Short URL using this php script.
The Test button checks to ensure the 3 fields are not empty and sends a test request to the php script; nothing is saved -- if the ID matches for that Short URL name, then it just triggers the short link on the YOURLS script so it opens in another tab or window. Otherwise it will show an error message.
The Save button will send the data to the php script and it will lookup the Short Name, verify the ID, then copy the Target URL into the 'long URL' field of the record associated with the 'Short URL's name.
The Cancel simply closes the form.
I want to be able to send them a link to this php script with the short URL's name added as a default to that edit field if it's in the querystring.
Some way to create a link that I can copy to the clipboard (or that's copied automatically) that goes to the php script with the short name in the querystring would be helpful so I don't have to mess with it.
The ID field is an EDIT field and the Target URL is a TEXT field.
The Short URL Name might be gibberish -- just a long string of characters. I don't want them to be meaningful.
Viewing the form in the browser debugger will not disclose any details of where the YOURLS script is installed (it should be on another domain than this php script) and will have some protection against spoofing and hacking. CORS might be an issue, so be aware of that.
You'll use the YOURLS API to search for the short URL name, identify the record or return an error.
As far as the ID goes, I'm thinking of making it their email address that can be validated against something in YOURLS. You'll need to figure that out for me.
The short URL names are all unique, so you could find the entry associated with the short URL name and ensure the ID matches something in that record. It may require another plugin or a field be added somewhere. (Maybe just make a YOURLS plugin to add a Notes field that can be used to save the ID string, like an email or phone#.)
REQUEST
Please tell me the following:
what your hourly rate is
how much time (#hours) you think this would take
how you'd approach this task, and
any problems you think might cause delays.
Please note: I am a software developer myself with 40+ years of experience. I know PHP and could do this myself, I just don't want to. I'm trying to learn how to effectively outsource projects, and this seems like a fairly simple one I need done.
BACKGROUND
Suppose you want to use a service that lets you provide a URL to an image or a website, but you think you might want to change it in the future. However, the site forces you to go through somebody to make changes. What you need is the ability to set up a redirect, like bitly. But most free services either don't let you edit the target URL (ie, where it goes to), or they limit you to how many times you can edit it before you have to pay. So you decide to set up your own YOURLS site, and use that.
USE-CASE / REQUIREMENTS
I have a service that needs me to provide URLs for my clients for some stuff, and I don't want to have to deal with changing their links on the back-end; I want them to be able to do that themselves. So I want to set up a YOURLS site, create a redirect for them, use a default link as the original target, then put the short link into the field that needs one, like their website or logo or headshot image. This is currently not a problem.
What I want is to be able to give them a link on a help page that goes to a short PHP script that you will write that opens a form and asks for this data:
some ID field (something they know)
the Short URL Name (something I'll give them)
the Target URL they want that short name to point to (a TEXT field)
There will be a [Test], [Save] and [Cancel] buttons on the form.
The client/customer never has access to the YOURLS script. Only I do. They can change the Target URL of any Short URL using this php script.
The Test button checks to ensure the 3 fields are not empty and sends a test request to the php script; nothing is saved -- if the ID matches for that Short URL name, then it just triggers the short link on the YOURLS script so it opens in another tab or window. Otherwise it will show an error message.
The Save button will send the data to the php script and it will lookup the Short Name, verify the ID, then copy the Target URL into the 'long URL' field of the record associated with the 'Short URL's name.
The Cancel simply closes the form.
I want to be able to send them a link to this php script with the short URL's name added as a default to that edit field if it's in the querystring.
Some way to create a link that I can copy to the clipboard (or that's copied automatically) that goes to the php script with the short name in the querystring would be helpful so I don't have to mess with it.
The ID field is an EDIT field and the Target URL is a TEXT field.
The Short URL Name might be gibberish -- just a long string of characters. I don't want them to be meaningful.
Viewing the form in the browser debugger will not disclose any details of where the YOURLS script is installed (it should be on another domain than this php script) and will have some protection against spoofing and hacking. CORS might be an issue, so be aware of that.
You'll use the YOURLS API to search for the short URL name, identify the record or return an error.
As far as the ID goes, I'm thinking of making it their email address that can be validated against something in YOURLS. You'll need to figure that out for me.
The short URL names are all unique, so you could find the entry associated with the short URL name and ensure the ID matches something in that record. It may require another plugin or a field be added somewhere. (Maybe just make a YOURLS plugin to add a Notes field that can be used to save the ID string, like an email or phone#.)
REQUEST
Please tell me the following:
what your hourly rate is
how much time (#hours) you think this would take
how you'd approach this task, and
any problems you think might cause delays.