Get text from a web site

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

spaceman33
Forum Newbie
Posts: 14
Joined: Mon Jul 25, 2005 3:35 pm

Post by spaceman33 »

Thanks, that's a much better solution.

Will be able to use that to shorten my code a lot :)

Revised code:

Code: Select all

$page=file_get_contents('http://aaotracker.4players.de/clanprofile.php?clanid=7523');
$page=strip_tags($page);
$name='Spaceman';
//echo $page;
$i=strpos($page, $name);

echo substr($page, $i+16, 5);
Thanks again.

Edit:

PS. Here is my work in progress at the moment, just concentrating on getting the data first, then tidy it up later, all made possible by the help from you guys :)
Image
Post Reply