The Little Guy Posted March 17, 2011 Share Posted March 17, 2011 I am setting up an API for my users, and the user sends post data via cURL. Is there a way I can see what site that the post data is coming from? would $_SERVER['REMOTE_HOST'] work? I am not using that to validate information. Quote Link to comment https://forums.phpfreaks.com/topic/230970-curl-remote-post/ Share on other sites More sharing options...
Eyewash01 Posted March 17, 2011 Share Posted March 17, 2011 http://php.net/manual/en/reserved.variables.server.php Quote Link to comment https://forums.phpfreaks.com/topic/230970-curl-remote-post/#findComment-1188946 Share on other sites More sharing options...
The Little Guy Posted March 17, 2011 Author Share Posted March 17, 2011 yeah, I know. Which one would be best to get were the post data came from? Quote Link to comment https://forums.phpfreaks.com/topic/230970-curl-remote-post/#findComment-1188948 Share on other sites More sharing options...
lastkarrde Posted March 18, 2011 Share Posted March 18, 2011 $_SERVER['REMOTE_ADDR'] returns the IP address of machine that requested the page (eg, the users IP address). You probably want that. Quote Link to comment https://forums.phpfreaks.com/topic/230970-curl-remote-post/#findComment-1189027 Share on other sites More sharing options...
The Little Guy Posted March 18, 2011 Author Share Posted March 18, 2011 Okay, is there anyway to get the domain? Quote Link to comment https://forums.phpfreaks.com/topic/230970-curl-remote-post/#findComment-1189202 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.