We help IT Professionals succeed at work.

automatic website updates in perl

MasterMitch
MasterMitch asked
on
Medium Priority
253 Views
Last Modified: 2010-03-05
I want to create a script that will modify a website automatically through a cron job. The script will have designated and ultimately random keywords to interchange with words already in the webpage. For instance I may have a word "house" in the webpage and through this script I can exchange everyword "house" with a random word from a list associated with "house" in the script. I want to be able to do this for unlimited words but only on one page of the website (index). any help is appreciated.

Mitch
Phoenix, AZ
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
After you change all the "house" to a random word, there will no longer be "house" in the page, so what should happen the next time the cron job runs?

Author

Commented:
I had thought of that so perhaps it should not so much look for a word but a number associated with a word. So that 0=house which is in index.php So the script could know to look for "0" which would be a static figure
CERTIFIED EXPERT
Top Expert 2007

Commented:
Why use Perl to update a PHP page?  Much better to use PHP to read the random keyword itself.

Author

Commented:
I am not opposed to it, I thought a perl script that was on a cron job would allow me to automate it better and not have to keep tabs on updating the page. I didnt know one could create a cron php
CERTIFIED EXPERT
Top Expert 2007

Commented:
Why do you want to use cron?  Do you want to have a new random keyword every hour (or whatever interval you define)?

Author

Commented:
yes I want to constantly have new words from a list be placed into my webpage for selected keywords..I have read this will get google to constantly reindex the pages becuase the page is being changed so often.

Author

Commented:
do you know of a solution to this idea?
Top Expert 2009

Commented:
If the page is dynamic with PHP, will google still reindex it?
CERTIFIED EXPERT
Top Expert 2007
Commented:
As far as I'm aware, Google will reindex any page that has expired or the content has changed.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2009

Commented:
As long as Tintin is correct, you could just have the PHP be dynamic.  Set the expires header for 1 hour every time...

#Of course the date would be calculated as now+1 hour, in this format...
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

Author

Commented:
I appreciate the concept of the reindexing and such. I knew that google would reindex if the content has changed which is why I want this kind of script. it could be php/perl I dont care really. I am trying to make the page change automatically based on certain specific words and punctuation to get reindexed often. So that is the solution I need. Can anyone suggest a solution to that specific need.

Author

Commented:
I had to give a grade, I had to close the question. these are good suggestions but they didnt actually answer my question
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.