![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2006
Posts: 1
Rep Power: 0
![]() |
Script that checks web page content??
Ok here is the problem...
Let's say we have about 1000 pages and we don't know which one has content(of course pages aren't on hard drive)... In what language should the script that checks for the content be and what should it be like??? I'm mostly thinking of Javascript for this task... although i have understanding of php and perl too... Because i have no idea if this is possible and cause i can't do it i hope you might be kind of help... Thanx everybody in advance... |
|
|
|
|
|
#2 |
|
Programmer
|
What do you mean? Are you looking for certain content, or do you have lots of blank pages to examine for any sort of content?
|
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
I wouldn't actually write software to do this; I'd just use wget to pull in the files then grep my local copies. Two shell commands isn't enough hassle to convince me to eliminate the manual element.
If you do want to write a program to do this, you could still use wget to do most of the work if you don't mind calling an external program; if all the links to the (say) 1000 files are at http://host/some/path/index.html then you can do: wget -r -l 1 http://host/some/path/index.html If the situation is a little more complex you might need a fruitier collection of arguments to wget, but this is definitely the way I'd go. I'd tend to go for Perl for this problem if you really want to write the software to retrieve the files and skim through them for a substring yourself; Perl's regular expressions make it ideal for the searching part of the job. JavaScript - by which I assume you mean JScript running inside WSH rather than JavaScript embedded in a web page (which can't do much) - could manage the skimming part but I'm not sure off the top of my head how I'd go about retrieving the files over HTTP. Heh, I'd probably call wget from the JScript then using the FileSystemObject to open the files and read through them actually. Anyway, hope this helps.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Counter Script | Toro | PHP | 3 | Jun 8th, 2006 12:01 AM |
| PySite - Web Development Framework | Sane | Python | 15 | Mar 27th, 2006 7:39 PM |
| Page Replacement Program (C++) | redhatter | Existing Project Development | 1 | Nov 20th, 2005 10:38 AM |
| Java script problem | zeotrex | JavaScript and Client-Side Browser Scripting | 5 | Sep 2nd, 2005 5:30 AM |
| PHP Question | jbh5000 | PHP | 1 | Feb 16th, 2005 3:17 PM |