I originally was using a simple php script which used wget to load another php page with variables, however this is not longer working and I have to use POST instead. Is there a way to get php to POST variables to a URL ?
You can use cURL to POST data from PHP: http://php.net/curl Take a look at the CURLOPT_POST and CURLOPT_POSTFIELDS settings: http://php.net/curl_setopt
Needs PHP 5: (Only use if you don't have cURL) function http_post($url, array $data, $get_response = false) { $data = http_build_query($data, '', '&'); $urlinfo = @parse_url($url); if (!$fp = @fopen($url, 'rb', false, stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => "Content-Type: application/x-www-form-urlencoded\r\n" . "Content-Length: " . strlen($data) . "\r\n" . "Referer: {$urlinfo['scheme']}://{$urlinfo['host']}/", 'content' => $data, 'user_agent' => $_SERVER['HTTP_USER_AGENT'] ) )))) { trigger_error(sprintf('Unable to open URL %s', $url), E_USER_WARNING); return false; } if ($get_response) { $response = ''; while (!feof($fp) AND !connection_aborted()) { $response .= fgets($fp); } } fclose($fp); return $get_response ? $response : true; } PHP: Usage example: $url = 'http://example.com/login.php'; $return_response = true; $data = array( 'username' => 'foo', 'password' => 'bar' ); echo http_post($url, $data, $return_response); PHP: