cron PHP sets current date in html files

Concluído Postado Dec 15, 2014 Pago na entrega
Concluído Pago na entrega

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 do Projeto: #6870569

Sobre o projeto

4 propostas Projeto remoto Ativo em Dec 15, 2014

Concedido a:

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 Mais

$72 USD em 1 dia
(13 Comentários)
4.3

4 freelancers estão ofertando em média $122 nesse trabalho

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

$131 USD em 1 dia
(495 Comentários)
9.0
Risalat1

A proposal has not yet been provided

$200 USD in 3 dias
(106 Comentários)
6.9
mestrophp

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

$85 USD in 3 dias
(15 Comentários)
3.5