Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 27th, 2006, 3:26 PM   #1
katas
Newbie
 
Join Date: Nov 2006
Posts: 1
Rep Power: 0 katas is on a distinguished road
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...
katas is offline   Reply With Quote
Old Nov 27th, 2006, 9:58 PM   #2
niteice
Programmer
 
niteice's Avatar
 
Join Date: Aug 2005
Posts: 98
Rep Power: 4 niteice is on a distinguished road
Send a message via AIM to niteice
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?
niteice is offline   Reply With Quote
Old Dec 1st, 2006, 6:01 PM   #3
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 328
Rep Power: 4 mackenga is on a distinguished road
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?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Counter Script Toro PHP 3 Jun 8th, 2006 1:01 AM
PySite - Web Development Framework Sane Python 15 Mar 27th, 2006 8:39 PM
Page Replacement Program (C++) redhatter Existing Project Development 1 Nov 20th, 2005 11:38 AM
Java script problem zeotrex JavaScript and Client-Side Browser Scripting 5 Sep 2nd, 2005 6:30 AM
PHP Question jbh5000 PHP 1 Feb 16th, 2005 4:17 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:22 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC