variable naming conventions are blown with 2.8 this is step 1 of fixing them
added in redirection following for the curl to fix the http->https redirection in drupal
added a use http cookie setting
added a test for protocol mismatch, cleaned up some php warnings, removed the 'use http cookie'