Parsing stuff from remote website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Amezis
Forum Newbie
Posts: 2
Joined: Thu Aug 17, 2006 2:46 pm

Parsing stuff from remote website

Post by Amezis »

Hello.

I'm making this tool which needs some remote info from a HTML site. But this info is "hidden" between sentences/words. An example is a site showing "The day is now day here.", and then I need to parse "day here" into a variable in PHP.

So how can I do that? Thanks in advance. :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Regular expressions are the usual way.

I hope you have their permission to pull data from their pages.
Amezis
Forum Newbie
Posts: 2
Joined: Thu Aug 17, 2006 2:46 pm

Post by Amezis »

Regular expressions?

fopen?

EDIT: And yes, we have.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Amezis wrote:Regular expressions?

fopen?
No. Regular expressions: http://us2.php.net/manual/en/ref.pcre.php
Post Reply