I am writing a simple php script which is supposed to grab the html page contents of a site and using regexp i will form my own version of the vote button, so that i can monitor when a user clicks on the vote button to vote.

The problem with this, the connection to the site always get's closed after the script is executed, so the PHP SESSION ID in my custom form is incorrect, when the user submits the form.

So, how do you use fshockopen to open a connection to site, extract all the info in a single string called $data and keep the connection open, as if a user was on the page at the actual domain and viewing the page?