need suggestion; for searching a word inside an html page

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
gghhh456
Forum Newbie
Posts: 2
Joined: Fri Feb 28, 2014 5:31 am

need suggestion; for searching a word inside an html page

Post by gghhh456 »

Hello every1,

I have a small project to do and I dont know whether PHP is the right language for this. But I am open to any other languages based on C/C++. I have knowledge in HTML, PHP and Java, but i am no expert, just an intermediate.

okay, Regarding my project:

I have a dynamic web page written in PHP, all I have to do search for certain words and count how many times these word has appeared. Table them with rows and columns.

My question is;

1. Is it possible to do using PHP or should I look for another programming language?

2. If its possible could you point me to right direction like where I should I look for.


Cheers

Gg.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: need suggestion; for searching a word inside an html pag

Post by Celauran »

You could read the page in with file_get_contents or cURL and then find your words with preg_match_all or by iterating over it and using stripos.
gghhh456
Forum Newbie
Posts: 2
Joined: Fri Feb 28, 2014 5:31 am

Re: need suggestion; for searching a word inside an html pag

Post by gghhh456 »

can I also extend the search to find certain type of images... like in an group of images of bird and Can I search say "Eagle" and display the results..???
Post Reply