Just pass the variables through the url when connecting to the site.

like... open a socket to "www.mysite.com/index.php?var=foobar"

In theory, this should work no?