Hey guys,
I am totally lost here.
Can anyone help me with a php code.
I wanna search for specific text strings in a webpage which i have predefined before and store them in a database.
Lets just say that i am looking for the name "jonh" in a webpage and store only the last names which always follows.
Is that possible?
Thanks in advance
Search content in a webpage?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Search content in a webpage?
Take a look at preg_match() with the PREG_OFFSET_CAPTURE flag. That will get you the position of all the matches. From there you can get to nearby text.
(#10850)