Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.