Well, I've been working on a tracking system for RuneScape. (It's a Java-Based, Browser MMORPG. You gain experience points in 24 separate skills, and they are all logged on a hi scores table.)

Anyways, here's what I've got-

<title>The Test Page</title>

// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://hiscore.runescape.com/hiscorepersonal.ws?user1=kingduffy_1");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser

// close cURL resource, and free up system resources


That takes the the whole webpage, which isn't what I want.

I want to be able to take the following information from each skill: Skill Name, Skill Level, Skill Experiance, and Skill Rank-then put it in a table.

So, I guess the question is: How do I take a particular line from one webpage and post it on another?

Also, how would I set up something that could actually track it? I posted on a different forum, and people just said "cURL and Cron, you idiot!". Not sure what that means.

Any help is greatly appreciated. If you have a question about what I'm asking, please-by all means, ask.

8 Years
Discussion Span
Last Post by somedude3488

i don't think there is a way to get a certain line with curl. you are just going to have to process the data returned with preg_match and a regex(regular expession).

you could also try fopen with fgets to read the file line by line, put the lines into an array.

after doing this, if you are on a unix system, set up a cron job. a cron job lets you run a script a certain time or interval on certain days. a simple google search should give you the information you need to do it.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.