Andrew Hucks
10-02-2008, 07:47 PM
Ok, I want to take a certain line from a webpage, and post just that line. How would I do that?
More Info:
I'm trying to make a script that'll ask someone for their Username (from the RPG RuneScape, located at www.runescape.com) and post just the skill name/level/xp/rank. You can find out what I'm talking out by going here:
http://hiscore.runescape.com/hiscorepersonal.ws?user1=zezima
Now, here's my Index/action files:
Index.php
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/ TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1” />
<title>Just a Test</title>
</head>
<body>
<font size=+2><u>Personal History</u></font><br>
<form action="action.php" method="post">
Username: <input name="username" type="text"/>
<input name="submit" type="submit"/>
</form>
</body>
</html>
Action.php
<html>
<head>
<title>TITLE</title>
</head>
<body>
<?php
$username=$_REQUEST['username'];
$stats=file_get_contents("http://hiscore.runescape.com/hiscorepersonal.ws?user1=".$username);
echo $stats;
?>
</body>
</html>
Like....I want the page to look like this:
Skill-Rank-Level-XP
Attack-1-99-13,000,000
(In a table, of course...)
(All that info is on the page, the one shown in action.php
But, with all the stats. So, like...how...?
More Info:
I'm trying to make a script that'll ask someone for their Username (from the RPG RuneScape, located at www.runescape.com) and post just the skill name/level/xp/rank. You can find out what I'm talking out by going here:
http://hiscore.runescape.com/hiscorepersonal.ws?user1=zezima
Now, here's my Index/action files:
Index.php
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/ TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1” />
<title>Just a Test</title>
</head>
<body>
<font size=+2><u>Personal History</u></font><br>
<form action="action.php" method="post">
Username: <input name="username" type="text"/>
<input name="submit" type="submit"/>
</form>
</body>
</html>
Action.php
<html>
<head>
<title>TITLE</title>
</head>
<body>
<?php
$username=$_REQUEST['username'];
$stats=file_get_contents("http://hiscore.runescape.com/hiscorepersonal.ws?user1=".$username);
echo $stats;
?>
</body>
</html>
Like....I want the page to look like this:
Skill-Rank-Level-XP
Attack-1-99-13,000,000
(In a table, of course...)
(All that info is on the page, the one shown in action.php
But, with all the stats. So, like...how...?