Coldblackice Posted December 9, 2009 Share Posted December 9, 2009 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! Quote Link to comment https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/ Share on other sites More sharing options...
oni-kun Posted December 9, 2009 Share Posted December 9, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/#findComment-974043 Share on other sites More sharing options...
Coldblackice Posted December 9, 2009 Author Share Posted December 9, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/#findComment-974172 Share on other sites More sharing options...
premiso Posted December 9, 2009 Share Posted December 9, 2009 Sure can, you want to take a look into curl Quote Link to comment https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/#findComment-974183 Share on other sites More sharing options...
Coldblackice Posted December 9, 2009 Author Share Posted December 9, 2009 Ahhh, beautiful! Just what I needed. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/184508-cooke-eating-php-machine/#findComment-974292 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.