Re: grabbing information from websites

From: Date: Tue, 28 Sep 2004 08:21:25 +0000
Subject: Re: grabbing information from websites
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198047@lists.php.net to get a copy of this message
Champinoamn wrote:
hi everyone, im fairly new to php scripting and was having trouble grabing information from a website. i have been able to grab information that is in amongst other text (for example, the word firemaking below) ------- <td><a href="hiscoreuser.cgi?username=champinoman&category=12" class=c>Firemaking</a></td> <td align="right">7,386</td><td align="right"> 61 </td><td align="right"> 333,575 </td></tr> ------- but the number i want to grab is the 61. its on its own line which i think is the reason im having trouble. i have been using this: eregi ("username=champinoman&category=13.*align=\"right\">(.*)</td>",$line,$out) what am i doing wrong? have i posted enough information. thank you for the help. p.s. try and keep the answers fairly straight forward as i am new to this instead of the POSIX regexp, tr using PERL style RegExps (www.php.net/pcre) Once you've done that, you can add the pattern modifier 'm' to allow multilines .


« previous php.general (#198047) next »