Hi there,
Thanks for looking at my project. This should be a very quick one. It's a set of 4 very small PHP scripts or mods to existing scripts.
In all cases, we are talking about PHP4 on a Linux server.
1.) Simple "write 1 line" script:
I have a tab-delineated flat text database on my server. I want a script that will check to see if a specific record is in the database (match of recordID). If it is, the script can end. If not, the script should add the record, which I will provide pre-formatted and ready to go ... we're talking about just adding 1 line of text to a database.
Question? Why don't I just add the text manually?
Answer: Because I intend to set it up as a daily cron job, always adding this line.
2.) Simple URL rewrite to text file:
I have a script named "[login to view URL]" which checks a directory of images against a set of URLs in a database, and makes a text file list of any images whose filenames are not yet in the directory.
I need a modification to this script. Currently, it writes all the URLS exactly as they are. What I want is this:
If a URL contains the text "overlays", followed by a "/" and a 4-digit number, it should replace this with the text "large/"
So, for example, if a photo image URL to be written is:
[login to view URL]
the script should actually write:
[login to view URL]
Does that make sense? I am attaching the [login to view URL] script for reference.
3.) Mod to record loading script
I have a very simple script called video.php. This script receives a record ID through the URL that calls it. It then loads a second script in the middle of the page, inserting that record ID into the URL that loads the second script. You can see it at work here: [login to view URL] As you can see, the first script is simply a way to have a page background for the second script.
What I need is this:
A modification to this first script that puts four text links on this page, just below the Flash window that is created by the second script.
The four links need to be populated with information from that record, which is in the same tab-delineated text flat file database I mentioned in part #1.
The links should be as follows:
View All Our Inventory "[login to view URL][dealerID]
Visit Our Website "[login to view URL][dealerID]
[login to view URL] Home "[login to view URL]"
View Full Listing "[login to view URL][recordID]
It's very simple. The recordID is simply column 8 of the record, and the dealerID is simply column 11 of the record.