Jump to content

Cooke-eating PHP machine


Coldblackice

Recommended Posts

I'm in the process of coding a PHP program that needs to login to a secure server's site, accept the cookies dished out, and then monitor/refresh a page. Basically a slimmed down, single-purposed web browser with no gui.

 

Is this possible in PHP without too much work (or without reinventing the wheel)? I'd rather do this internally in a PHP program and not set it to run keyboard functions/macros on another web browser, if possible.

 

Thanks for any suggestions!

Link to comment
https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/
Share on other sites

Yes, you can very slowly do this by sending headers and connecting via SSL, outputting contents into a frame or similar. But you say refresh, you can maybe do this better in AJAX, you can handle cookies easier that way.

 

Not sure what you exactly want to do with the connection, so I can't really say anymore.

Basically, I just need the program to "watch" a certain web page, continually refreshing it, and checking its contents. On sites that don't require a login or secure connection, I just use file_get_contents("site"), and then comb through the html.

 

The site that needs to be reached, however, requires a login (and places cookies on the machine). Does that explain it better?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.