You will need to load the variables on the page once the JavaScript variables are obtained. For example, the visitor comes to the home page and the variables are loaded into a link, cookie or header relocate, the variables are now accesible to PHP on the next page. PHP can not access client side code directly (JavaScript), it does the processing on the server then sends the HTML page to the visitor.