Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 30th, 2005, 09:39 AM
Registered User
 
Join Date: Dec 2005
Location: Lahore, Punjab, Pakistan.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aatayyab Send a message via AIM to aatayyab Send a message via MSN to aatayyab Send a message via Yahoo to aatayyab
Default How do I search TEXT in web folders and pages

hi,

i have a website purely in TEXT format in shape of web pages .HTML and in many sub-folders. i want to search the text in PHP and display the resulting page links which contain that specific search string. how can i do it in PHP?

Best Regards,

Amir Ali Tayyab
IT Consultant since 1988
http://softwarepk.com
aatayyab@yahoo.com
Cell: 92-333-4779799
Address: 49-MZ, Central Plaza, Garden Town, Lahore, Pakistan
Reply With Quote
  #2 (permalink)  
Old January 9th, 2006, 12:03 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pmnghi
Default

Hello
I under your problem
you should use the getfile() (PHP4) to get an entire content of a file ( or a url file ) and save it to a variables
Now, you know what to do next .... ?
if it doesnt work, please reply to me


Reply With Quote
  #3 (permalink)  
Old January 9th, 2006, 01:55 AM
Registered User
 
Join Date: Dec 2005
Location: Lahore, Punjab, Pakistan.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aatayyab Send a message via AIM to aatayyab Send a message via MSN to aatayyab Send a message via Yahoo to aatayyab
Default

Sure, it might be easy. however, my problem is that i am very new in PHP and i don't have one page, i have about 1,000 html text pages with lengths more than 50 or so A4 size. so, kindly suggest me some PHP script from start to beging to search the whole text in the site. thanks,

amir


Best Regards,

Amir Ali Tayyab
IT Consultant since 1988
http://softwarepk.com
aatayyab@yahoo.com
Cell: 92-333-4779799
Address: 49-MZ, Central Plaza, Garden Town, Lahore, Pakistan
Reply With Quote
  #4 (permalink)  
Old January 9th, 2006, 04:48 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Hi,

You could use any of many ready free scripts available from SourceForge or HotScripts. Or you may wait to learn and write the script.



`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Students' finances
Reply With Quote
  #5 (permalink)  
Old January 9th, 2006, 11:39 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

IF you have has many html pages has that doing a search system in php is very unlikely to work.

There is a timeout on the server which is very likely to be hit when the php is still scanning the documents. which mean: this page timeout please press refresh blabla...

Alternatively you could I suppose have a system which scan once all the documents and build a search result file but its still going to be very slow.

I know its not what you had in mind but if you can either transfer all the html documents into a database or only the text part into a database.

Then php send a search request @ the database and that is more or less immediate.
Reply With Quote
  #6 (permalink)  
Old January 13th, 2006, 04:51 AM
Registered User
 
Join Date: Dec 2005
Location: Lahore, Punjab, Pakistan.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aatayyab Send a message via AIM to aatayyab Send a message via MSN to aatayyab Send a message via Yahoo to aatayyab
Default

Quote:
quote:Originally posted by anshul
 Hi,

You could use any of many ready free scripts available from SourceForge or HotScripts. Or you may wait to learn and write the script.



`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Students' finances
hi,

could you please do that for me and point me towards any of such free scripts out there?

amir


Best Regards,

Amir Ali Tayyab
IT Consultant since 1988
http://softwarepk.com
aatayyab@yahoo.com
Cell: 92-333-4779799
Address: 49-MZ, Central Plaza, Garden Town, Lahore, Pakistan
Reply With Quote
  #7 (permalink)  
Old January 13th, 2006, 04:52 AM
Registered User
 
Join Date: Dec 2005
Location: Lahore, Punjab, Pakistan.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aatayyab Send a message via AIM to aatayyab Send a message via MSN to aatayyab Send a message via Yahoo to aatayyab
Default

Quote:
quote:Originally posted by Mantis
 IF you have has many html pages has that doing a search system in php is very unlikely to work.

There is a timeout on the server which is very likely to be hit when the php is still scanning the documents. which mean: this page timeout please press refresh blabla...

Alternatively you could I suppose have a system which scan once all the documents and build a search result file but its still going to be very slow.

I know its not what you had in mind but if you can either transfer all the html documents into a database or only the text part into a database.

Then php send a search request @ the database and that is more or less immediate.
sure, i am ready to do that and convert them into the text field of the mysql db. can you guide me step-by-step how to do it?

amir


Best Regards,

Amir Ali Tayyab
IT Consultant since 1988
http://softwarepk.com
aatayyab@yahoo.com
Cell: 92-333-4779799
Address: 49-MZ, Central Plaza, Garden Town, Lahore, Pakistan
Reply With Quote
  #8 (permalink)  
Old January 15th, 2006, 01:08 PM
Friend of Wrox
 
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry mate but thats around 2 weeks of work.
Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
access ASP pages in different folders misskaos99 Classic ASP Basics 1 May 18th, 2008 07:30 PM
grep-search for text within files, within folders crmpicco Linux 2 September 1st, 2007 11:23 AM
New text search doesn't preselect search string planoie Visual Studio 2005 0 July 23rd, 2007 07:47 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 03:16 AM
Web pages constructing: I-mode(mobile) pages karib Dreamweaver (all versions) 3 June 6th, 2004 10:48 AM



All times are GMT -4. The time now is 10:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.