Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apex_micro_site
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
apex_micro_site
Commits
41e3bc3c
You need to sign in or sign up before continuing.
Commit
41e3bc3c
authored
May 10, 2018
by
nadeem.qasmi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
location fix php again
parent
33639c7a
Pipeline
#509
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
27 deletions
+6
-27
download-now.php
...content/plugins/apex_global_lms/template/download-now.php
+6
-27
No files found.
WWW_DATA/wp-content/plugins/apex_global_lms/template/download-now.php
View file @
41e3bc3c
...
...
@@ -396,32 +396,11 @@ $selected_id = isset( $_GET['course'] ) ? $_GET['course'] : - 1;
<option
value=
"ZW"
>
Zimbabwe
</option>
</select>
</div>
<?php
function
getUserIP
()
{
$ipaddress
=
''
;
if
(
getenv
(
'HTTP_CLIENT_IP'
))
$ipaddress
=
getenv
(
'HTTP_CLIENT_IP'
);
else
if
(
getenv
(
'HTTP_X_FORWARDED_FOR'
))
$ipaddress
=
getenv
(
'HTTP_X_FORWARDED_FOR'
);
else
if
(
getenv
(
'HTTP_X_FORWARDED'
))
$ipaddress
=
getenv
(
'HTTP_X_FORWARDED'
);
else
if
(
getenv
(
'HTTP_FORWARDED_FOR'
))
$ipaddress
=
getenv
(
'HTTP_FORWARDED_FOR'
);
else
if
(
getenv
(
'HTTP_FORWARDED'
))
$ipaddress
=
getenv
(
'HTTP_FORWARDED'
);
else
if
(
getenv
(
'REMOTE_ADDR'
))
$ipaddress
=
getenv
(
'REMOTE_ADDR'
);
else
$ipaddress
=
'Unknown IP Address'
;
return
$ipaddress
;
}
$user_ip
=
getUserIP
();
<?php
echo
$user_ip
;
// Output IP address (Ex: 123.345.456.678)
$externalContent
=
file_get_contents
(
'http://checkip.dyndns.com/'
);
preg_match
(
'/Current IP Address: \[?([:.0-9a-fA-F]+)\]?/'
,
$externalContent
,
$m
);
$externalIp
=
$m
[
1
];
?>
...
...
@@ -431,9 +410,9 @@ echo $user_ip; // Output IP address (Ex: 123.345.456.678)
var
ips
=
'00'
;
ips
=
'
<?php
echo
(
$
user_i
p
);
?>
'
;
ips
=
'
<?php
echo
(
$
externalI
p
);
?>
'
;
//
console.log(ips);
console
.
log
(
ips
);
$
.
getJSON
(
"https://cors-anywhere.herokuapp.com/http://www.geoplugin.net/json.gp?ip="
+
ips
,
function
(
response
){
$
(
'#country_code'
).
val
(
response
.
geoplugin_countryCode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment