interpim Posted July 31, 2008 Share Posted July 31, 2008 So... is there anyway to send Post_vars from one server to a webpage to basically to a remote login to another website? I can't think of how to do it... Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/ Share on other sites More sharing options...
DarkWater Posted July 31, 2008 Share Posted July 31, 2008 Use cURL. Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/#findComment-604187 Share on other sites More sharing options...
Nhoj Posted July 31, 2008 Share Posted July 31, 2008 As darkwater said, you will need to use cURL. http://us.php.net/manual/en/ref.curl.php Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/#findComment-604190 Share on other sites More sharing options...
interpim Posted July 31, 2008 Author Share Posted July 31, 2008 Great Thanks It doesn't seem to be working for me though... anyone see anything wrong with this code? $URL="http://realmwar.warhammeronline.com/realmwar/Index.war"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://$URL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "war_username=$user_name&war_password=$pword");curl_exec ($ch); curl_close ($ch); Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/#findComment-604196 Share on other sites More sharing options...
ronnie88 Posted July 31, 2008 Share Posted July 31, 2008 do you have curl installed on the server? Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/#findComment-604203 Share on other sites More sharing options...
DarkWater Posted July 31, 2008 Share Posted July 31, 2008 Remove the http:// from here curl_setopt($ch, CURLOPT_URL,"http://$URL"); Quote Link to comment https://forums.phpfreaks.com/topic/117458-post_vars-across-servers/#findComment-604206 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.