cron PHP sets current date in html files

已完成 已发布的 Dec 15, 2014 货到付款
已完成 货到付款

I need a PHP script that will contain an array of strings, perhaps 4 strings to start.

(I may add more later).

Each string is a full URL like: 'http ://example. com/myfolder/[url removed, login to view]'

(Note, you may need to work in filesystem names, but for my simplicity, I need

to be able to paste in URLs, so your code probably needs to convert them.)

My equivalent filesystem name is probably '/home/myLogon/public_html/myfolder/[url removed, login to view]'

For each string it the array, the PHP script will open and read the file,

search for <span id="livedate">

It will then find the </span> that follows it. Now knowing the start and end,

it will replace whatever is in-between, with the current date, in a format

resembling "December 15, 2014"

<span id="livedate">December 15, 2014</span> would change to <span id="livedate">December 16, 2014</span>

There have been PHP version changes affecting date commands, so be sure you use PHP that can work on v5.2 up to 5.6

If the <span>s are missing, do nothing, silently.

The cron job runs on linux, using cPanel 11.

You will not be given my cPanel password, so don't ask. Instead, provide me with a full cron command, something like:

php -q -d safe_mode=off /home/myLogon/public_html/mySecretFolder/[url removed, login to view] >/dev/null 2>&1

and be prepared to give me detailed instructions to add it, so that it runs Once-A-Day, sometime between midnight and 1 am,

Create a setting and logic in the PHP, to determine whether it will actually change the string once-a-day, or every second day or every third day, setting the date to the current date.

Saving the html file to disk, so that it's modified date is changed, so that

when a browser fetches the page, the header tells the browser that the file is a new version. I hope it's as simple as that. If extra needs to be done, so that browsers or googlebot useragents treat the file as recently edited, that needs to be coded somehow.

Put good comments inside the PHP file, explaining how to add new strings and how to change the setting from daily to every third day. Also comment inside the PHP file to explain what the cron is doing too.

PHP

项目ID: #6870569

关于项目

4个方案 远程项目 活跃的Dec 15, 2014

授予:

busygayan

Hello, i went through the job description and this should be about 2 hours of code, its a simple project. Lets get started right now. I will also use OOP and explain code using comments, if you prefer stay on skype 更多

$72 USD 在1天内
(13条评论)
4.3

有4名威客正在参与此工作的竞标,均价$122/小时

lightcresent

Fully understand what you need... Will give you seperate txt file to add strings and script will process the files directly from there.... Thanks

$131USD 在1天里
(495条评论)
9.0
Risalat1

A proposal has not yet been provided

$200 USD 在3天内
(106条评论)
6.9
mestrophp

helllo sir ready to start your work and please come on discussion .......................................................................!!!!!

$85 USD 在3天内
(15条评论)
3.5