I can use a form with 2 hidden fields of var1 and var2 and push the form to http://www.domain.com/file.html. This works perfectly and does not show the end user the 2 variables in the landing url.
BUT, how do I do it within a php function. In other words, I am running an if else statement. If true, then perform above function automatically (without needed the user to click on a form buttom). I need the 2 variables to be recognized by file.html but so that the users cannot see them.