Solved

automatic website updates in perl

Posted on 2006-10-23
12
191 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
0
Comment
Question by:MasterMitch
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 17791367
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?
0
 

Author Comment

by:MasterMitch
ID: 17791616
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
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17791934
Why use Perl to update a PHP page?  Much better to use PHP to read the random keyword itself.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:MasterMitch
ID: 17791985
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
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17792069
Why do you want to use cron?  Do you want to have a new random keyword every hour (or whatever interval you define)?
0
 

Author Comment

by:MasterMitch
ID: 17792328
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.
0
 

Author Comment

by:MasterMitch
ID: 17792332
do you know of a solution to this idea?
0
 
LVL 39

Expert Comment

by:Adam314
ID: 17792416
If the page is dynamic with PHP, will google still reindex it?
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 17792938
As far as I'm aware, Google will reindex any page that has expired or the content has changed.
0
 
LVL 39

Expert Comment

by:Adam314
ID: 17797138
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");

0
 

Author Comment

by:MasterMitch
ID: 17843754
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.
0
 

Author Comment

by:MasterMitch
ID: 18071749
I had to give a grade, I had to close the question. these are good suggestions but they didnt actually answer my question
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending email via Perl on Windows 3 165
Search in text file in column and compare 4 47
Perl Application JSON Receiving Strange Java Error 3 70
quoting a comma separated list 20 84
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question