Pulling a page source with PHP?

LeetestUnleet

Senior member
Aug 16, 2002
680
0
0
I need to pull the source from a web page and search it for a particular string so that my script can interact with it (it's a ranking statistics page for an online game). Anyone have a clue how to do it?
 

LeetestUnleet

Senior member
Aug 16, 2002
680
0
0
LOL you caught me :p How'd you guess? Actually, I'm not coding it -- a friend of mine in my alliance is, and he's asking for my help on it. You should be able to just use an fopen statement, right? But how do you access the source from there...?
 

rmrf

Platinum Member
May 14, 2003
2,872
0
0
I play as well. I've been looking over it, but I just don't think you can grab the source of a page remotely. I'm kind of a noob at this anyway's, so it would be interesting to see this done.

btw, what alliance is it?

nm: La Cosa Nostra

It would be cool to see a completely web based clicker with authentication made, but I'm just not sure how it is going to happen. Good luck, and post back with what you find.
 

rmrf

Platinum Member
May 14, 2003
2,872
0
0
just out of curiousity, how far along are you? is the verification the last part of the program, or are you guys just getting ready for age4?
 

LeetestUnleet

Senior member
Aug 16, 2002
680
0
0
Actually, we have our own Recruiter completely up and running -- it's open to all non-SC members and non-LS-chain. http://www.lacnfamily.com/lacnrecruiter

What I think my friend is trying to do is make a script that tracks your rank throughout a period of time. I only talked to him for a few minutes before he went to bed, so I'm not sure. Basically the script will find your stats link and look for the rank, then log it to a database.
 

rmrf

Platinum Member
May 14, 2003
2,872
0
0
Ah, so it is just a stat's tracker. I thought you were building a web based clicker, and wanted a way to validate whether or not a link has been clicked by grabbing the source from the client machine. This makes sense now.

I think fopen would work then, but you have to have some way of knowing which line the rank is on, and how to eliminate any html tags that would be around it. I don't think php can grab from a specific line like you would from grep or awk or sed, but someone has to have done this before. I will keep looking at this and see what I can dig up.