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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.