{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2","id":84362391,"html_url":"https://github.com/Arsenal21/simple-download-monitor/pull/2","diff_url":"https://github.com/Arsenal21/simple-download-monitor/pull/2.diff","patch_url":"https://github.com/Arsenal21/simple-download-monitor/pull/2.patch","issue_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/2","number":2,"state":"closed","locked":false,"title":"Improve remote IP and location detection.","user":{"login":"chesio","id":2021167,"avatar_url":"https://avatars.githubusercontent.com/u/2021167?v=3","gravatar_id":"","url":"https://api.github.com/users/chesio","html_url":"https://github.com/chesio","followers_url":"https://api.github.com/users/chesio/followers","following_url":"https://api.github.com/users/chesio/following{/other_user}","gists_url":"https://api.github.com/users/chesio/gists{/gist_id}","starred_url":"https://api.github.com/users/chesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesio/subscriptions","organizations_url":"https://api.github.com/users/chesio/orgs","repos_url":"https://api.github.com/users/chesio/repos","events_url":"https://api.github.com/users/chesio/events{/privacy}","received_events_url":"https://api.github.com/users/chesio/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI think the problem described in this [support thread](https://wordpress.org/support/topic/download-log-on-shows-site-ip/) might be caused by simple fact that `$_SERVER[\"REMOTE_ADDR\"]` does not always hold remote IP.\r\n\r\nThis PR fixes it by using a new method for IP detection (inspired by this [SO post](http://stackoverflow.com/questions/1634782/what-is-the-most-accurate-way-to-retrieve-a-users-correct-ip-address-in-php)). Also, it slightly simplifies `sdm_ip_info` function.\r\n\r\nGreets,\r\nČeslav","created_at":"2016-09-07T19:53:37Z","updated_at":"2016-09-08T07:59:34Z","closed_at":"2016-09-08T07:59:34Z","merged_at":"2016-09-08T07:59:34Z","merge_commit_sha":"1bafcd86b8b82018ff03e4308802bc01fe38150e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/2/comments","statuses_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/statuses/325b4d3330aaeff8254c4286f76079a4febebcc3","head":{"label":"chesio:better-ip-detection","ref":"better-ip-detection","sha":"325b4d3330aaeff8254c4286f76079a4febebcc3","user":{"login":"chesio","id":2021167,"avatar_url":"https://avatars.githubusercontent.com/u/2021167?v=3","gravatar_id":"","url":"https://api.github.com/users/chesio","html_url":"https://github.com/chesio","followers_url":"https://api.github.com/users/chesio/followers","following_url":"https://api.github.com/users/chesio/following{/other_user}","gists_url":"https://api.github.com/users/chesio/gists{/gist_id}","starred_url":"https://api.github.com/users/chesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesio/subscriptions","organizations_url":"https://api.github.com/users/chesio/orgs","repos_url":"https://api.github.com/users/chesio/repos","events_url":"https://api.github.com/users/chesio/events{/privacy}","received_events_url":"https://api.github.com/users/chesio/received_events","type":"User","site_admin":false},"repo":{"id":63634016,"name":"simple-download-monitor","full_name":"chesio/simple-download-monitor","owner":{"login":"chesio","id":2021167,"avatar_url":"https://avatars.githubusercontent.com/u/2021167?v=3","gravatar_id":"","url":"https://api.github.com/users/chesio","html_url":"https://github.com/chesio","followers_url":"https://api.github.com/users/chesio/followers","following_url":"https://api.github.com/users/chesio/following{/other_user}","gists_url":"https://api.github.com/users/chesio/gists{/gist_id}","starred_url":"https://api.github.com/users/chesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesio/subscriptions","organizations_url":"https://api.github.com/users/chesio/orgs","repos_url":"https://api.github.com/users/chesio/repos","events_url":"https://api.github.com/users/chesio/events{/privacy}","received_events_url":"https://api.github.com/users/chesio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chesio/simple-download-monitor","description":null,"fork":true,"url":"https://api.github.com/repos/chesio/simple-download-monitor","forks_url":"https://api.github.com/repos/chesio/simple-download-monitor/forks","keys_url":"https://api.github.com/repos/chesio/simple-download-monitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chesio/simple-download-monitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chesio/simple-download-monitor/teams","hooks_url":"https://api.github.com/repos/chesio/simple-download-monitor/hooks","issue_events_url":"https://api.github.com/repos/chesio/simple-download-monitor/issues/events{/number}","events_url":"https://api.github.com/repos/chesio/simple-download-monitor/events","assignees_url":"https://api.github.com/repos/chesio/simple-download-monitor/assignees{/user}","branches_url":"https://api.github.com/repos/chesio/simple-download-monitor/branches{/branch}","tags_url":"https://api.github.com/repos/chesio/simple-download-monitor/tags","blobs_url":"https://api.github.com/repos/chesio/simple-download-monitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chesio/simple-download-monitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chesio/simple-download-monitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/chesio/simple-download-monitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chesio/simple-download-monitor/statuses/{sha}","languages_url":"https://api.github.com/repos/chesio/simple-download-monitor/languages","stargazers_url":"https://api.github.com/repos/chesio/simple-download-monitor/stargazers","contributors_url":"https://api.github.com/repos/chesio/simple-download-monitor/contributors","subscribers_url":"https://api.github.com/repos/chesio/simple-download-monitor/subscribers","subscription_url":"https://api.github.com/repos/chesio/simple-download-monitor/subscription","commits_url":"https://api.github.com/repos/chesio/simple-download-monitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/chesio/simple-download-monitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/chesio/simple-download-monitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/chesio/simple-download-monitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/chesio/simple-download-monitor/contents/{+path}","compare_url":"https://api.github.com/repos/chesio/simple-download-monitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chesio/simple-download-monitor/merges","archive_url":"https://api.github.com/repos/chesio/simple-download-monitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chesio/simple-download-monitor/downloads","issues_url":"https://api.github.com/repos/chesio/simple-download-monitor/issues{/number}","pulls_url":"https://api.github.com/repos/chesio/simple-download-monitor/pulls{/number}","milestones_url":"https://api.github.com/repos/chesio/simple-download-monitor/milestones{/number}","notifications_url":"https://api.github.com/repos/chesio/simple-download-monitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chesio/simple-download-monitor/labels{/name}","releases_url":"https://api.github.com/repos/chesio/simple-download-monitor/releases{/id}","deployments_url":"https://api.github.com/repos/chesio/simple-download-monitor/deployments","created_at":"2016-07-18T20:15:11Z","updated_at":"2016-07-18T20:15:12Z","pushed_at":"2016-09-07T20:33:34Z","git_url":"git://github.com/chesio/simple-download-monitor.git","ssh_url":"git@github.com:chesio/simple-download-monitor.git","clone_url":"https://github.com/chesio/simple-download-monitor.git","svn_url":"https://github.com/chesio/simple-download-monitor","homepage":null,"size":228,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Arsenal21:master","ref":"master","sha":"292f1ed080c905400bcf92c2623b06073d881f4d","user":{"login":"Arsenal21","id":6433635,"avatar_url":"https://avatars.githubusercontent.com/u/6433635?v=3","gravatar_id":"","url":"https://api.github.com/users/Arsenal21","html_url":"https://github.com/Arsenal21","followers_url":"https://api.github.com/users/Arsenal21/followers","following_url":"https://api.github.com/users/Arsenal21/following{/other_user}","gists_url":"https://api.github.com/users/Arsenal21/gists{/gist_id}","starred_url":"https://api.github.com/users/Arsenal21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arsenal21/subscriptions","organizations_url":"https://api.github.com/users/Arsenal21/orgs","repos_url":"https://api.github.com/users/Arsenal21/repos","events_url":"https://api.github.com/users/Arsenal21/events{/privacy}","received_events_url":"https://api.github.com/users/Arsenal21/received_events","type":"User","site_admin":false},"repo":{"id":22301753,"name":"simple-download-monitor","full_name":"Arsenal21/simple-download-monitor","owner":{"login":"Arsenal21","id":6433635,"avatar_url":"https://avatars.githubusercontent.com/u/6433635?v=3","gravatar_id":"","url":"https://api.github.com/users/Arsenal21","html_url":"https://github.com/Arsenal21","followers_url":"https://api.github.com/users/Arsenal21/followers","following_url":"https://api.github.com/users/Arsenal21/following{/other_user}","gists_url":"https://api.github.com/users/Arsenal21/gists{/gist_id}","starred_url":"https://api.github.com/users/Arsenal21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arsenal21/subscriptions","organizations_url":"https://api.github.com/users/Arsenal21/orgs","repos_url":"https://api.github.com/users/Arsenal21/repos","events_url":"https://api.github.com/users/Arsenal21/events{/privacy}","received_events_url":"https://api.github.com/users/Arsenal21/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arsenal21/simple-download-monitor","description":"","fork":false,"url":"https://api.github.com/repos/Arsenal21/simple-download-monitor","forks_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/forks","keys_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/teams","hooks_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/hooks","issue_events_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/events{/number}","events_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/events","assignees_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/assignees{/user}","branches_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/branches{/branch}","tags_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/tags","blobs_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/statuses/{sha}","languages_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/languages","stargazers_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/stargazers","contributors_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/contributors","subscribers_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/subscribers","subscription_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/subscription","commits_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/contents/{+path}","compare_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/merges","archive_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/downloads","issues_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues{/number}","pulls_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls{/number}","milestones_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/milestones{/number}","notifications_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/labels{/name}","releases_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/releases{/id}","deployments_url":"https://api.github.com/repos/Arsenal21/simple-download-monitor/deployments","created_at":"2014-07-27T02:58:19Z","updated_at":"2016-01-17T01:34:06Z","pushed_at":"2016-09-08T07:59:34Z","git_url":"git://github.com/Arsenal21/simple-download-monitor.git","ssh_url":"git@github.com:Arsenal21/simple-download-monitor.git","clone_url":"https://github.com/Arsenal21/simple-download-monitor.git","svn_url":"https://github.com/Arsenal21/simple-download-monitor","homepage":null,"size":232,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2"},"html":{"href":"https://github.com/Arsenal21/simple-download-monitor/pull/2"},"issue":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/2"},"comments":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Arsenal21/simple-download-monitor/statuses/325b4d3330aaeff8254c4286f76079a4febebcc3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Arsenal21","id":6433635,"avatar_url":"https://avatars.githubusercontent.com/u/6433635?v=3","gravatar_id":"","url":"https://api.github.com/users/Arsenal21","html_url":"https://github.com/Arsenal21","followers_url":"https://api.github.com/users/Arsenal21/followers","following_url":"https://api.github.com/users/Arsenal21/following{/other_user}","gists_url":"https://api.github.com/users/Arsenal21/gists{/gist_id}","starred_url":"https://api.github.com/users/Arsenal21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arsenal21/subscriptions","organizations_url":"https://api.github.com/users/Arsenal21/orgs","repos_url":"https://api.github.com/users/Arsenal21/repos","events_url":"https://api.github.com/users/Arsenal21/events{/privacy}","received_events_url":"https://api.github.com/users/Arsenal21/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":66,"deletions":53,"changed_files":2}}
{"actor":{"display_login":"Arsenal21"}}