• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Pulling a page source with PHP?

LeetestUnleet

Senior member
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?
 
LOL you caught me 😛 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...?
 
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.
 
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?
 
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.
 
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.
 
Back
Top