5kyy8lu3 Posted August 21, 2009 Share Posted August 21, 2009 Hi. My buddy wants to log his ip hits to his website using my ip logging script I made. Instead of porting my code over to his server, is there any way to just run my ip logging script remotely? Assuming his host doesn't allow doing http:// in an include(). My buddy suggested doing a <img src="file.php"> sort of thing but would there be a way to do something similar to that without having to load an image? I'm stumped and I'm open to suggestions. None involving porting my code over though, I made a pretty in depth log of all kinds of visitor info and graphs and junk so it wouldn't be fun to port. I prefer to log stuff remotely and give him a login to my logger. Quote Link to comment https://forums.phpfreaks.com/topic/171355-run-php-script-from-another-location-ip-logging/ Share on other sites More sharing options...
sKunKbad Posted August 22, 2009 Share Posted August 22, 2009 The best thing for you and your buddy would be for he to use cURL and post to your file. Your file could then process the post, and return some type of output that he could then parse. XML would be easy to generate and parse, but it could even be a csv string, or even a simple integer if that is all that is required. Quote Link to comment https://forums.phpfreaks.com/topic/171355-run-php-script-from-another-location-ip-logging/#findComment-903783 Share on other sites More sharing options...
ignace Posted August 22, 2009 Share Posted August 22, 2009 My buddy wants to log his ip hits to his website using my ip logging script I made. Like skunkbad said your buddy needs to use cURL. What skunkbad however didn't said was that he has to post the user's ip address because if you would do: $_SERVER['REMOTE_ADDR']; You would end up logging your buddy's server ip address instead of his visitor's ip address. Quote Link to comment https://forums.phpfreaks.com/topic/171355-run-php-script-from-another-location-ip-logging/#findComment-903870 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.