When i go to API settings,
Also does it show the servers ip adres or my own wan ip?
Cause when i make an php file with
Code: Select all
<? echo $_SERVER["REMOTE_ADDR"];
Code: Select all
<? echo $_SERVER["REMOTE_ADDR"];
Code: Select all
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) && ip2long($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
That fixed the ip in the admin API settings,ocmta wrote: ↑Thu Nov 15, 2018 9:27 amIt shows $_SERVER['REMOTE_ADDR'], which is supposed to be your IP, but if your site uses something like Cloudflare, it shows Cloudflare's IP. For example, if it's Cloudflare you need to add this line in system/startup.php at the top right below <?php :Code: Select all
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) && ip2long($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
Code: Select all
order deny,allow
deny from all
allow from (my ip)
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Set your hosts file on your computer to direct you straight to the server IP rather than CloudFlare.PhantomMenace wrote: ↑Thu Nov 15, 2018 10:05 amis not working probaly cause of cloudflare then i assume
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
How would do i do that?paulfeakins wrote: ↑Thu Nov 15, 2018 8:07 pmSet your hosts file on your computer to direct you straight to the server IP rather than CloudFlare.PhantomMenace wrote: ↑Thu Nov 15, 2018 10:05 amis not working probaly cause of cloudflare then i assume
Code: Select all
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
*mywanip* *serverip*
Code: Select all
serverip your_site_domain_name
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
i changed te hosting file accordingly and flushed my dnsocmta wrote: ↑Thu Nov 15, 2018 9:12 pmNo, in hosts file it should be:Then put your real IP in .htaccess and it should work, but only for your own IP, any other IP you add as "allow from" will not work, unless they access the site directly.Code: Select all
serverip your_site_domain_name
Code: Select all
<? echo $ip=$_SERVER["HTTP_CF_CONNECTING_IP"];
if (!isset($ip)) {
$ip = $_SERVER['REMOTE_ADDR'];
}
ocmta wrote: ↑Thu Nov 15, 2018 9:27 amIt shows $_SERVER['REMOTE_ADDR'], which is supposed to be your IP, but if your site uses something like Cloudflare, it shows Cloudflare's IP. For example, if it's Cloudflare you need to add this line in system/startup.php at the top right below <?php :Code: Select all
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) && ip2long($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing
Code: Select all
System/Startup.php
PhantomMenace wrote: ↑Thu Nov 22, 2018 6:21 pmit shows my real ip when usingin a custome page,Code: Select all
<? echo $ip=$_SERVER["HTTP_CF_CONNECTING_IP"]; if (!isset($ip)) { $ip = $_SERVER['REMOTE_ADDR']; }
is there a way to use this in my htaccess
Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing
See this solution: viewtopic.php?f=202&t=216941&p=782231#p782231seanstorm100 wrote: ↑Sun Apr 05, 2020 5:27 amYou can add toQuestion: I am seeing a banner in Extension>Extensions seeing:Code: Select all
System/Startup.php
DDoS protection by Cloudflare
Ray ID: ************
The font size increase tremendously and the extension page refresh very often. I am not sure how this got there as I did not install any code for Cloudflare except the above that displays the Origin IP Address of each visitor, but even when I remove this, the banner is still there.
I opened a ticket with Cloudflare, however, does anyone have any ideas as to what's causing this? Could this be an iframe while using their CDN?
PhantomMenace wrote: ↑Thu Nov 22, 2018 6:21 pmit shows my real ip when usingin a custome page,Code: Select all
<? echo $ip=$_SERVER["HTTP_CF_CONNECTING_IP"]; if (!isset($ip)) { $ip = $_SERVER['REMOTE_ADDR']; }
is there a way to use this in my htaccess
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
straightlight wrote: ↑Sun Apr 05, 2020 5:34 amSee this solution: viewtopic.php?f=202&t=216941&p=782231#p782231seanstorm100 wrote: ↑Sun Apr 05, 2020 5:27 amYou can add toQuestion: I am seeing a banner in Extension>Extensions seeing:Code: Select all
System/Startup.php
DDoS protection by Cloudflare
Ray ID: ************
The font size increase tremendously and the extension page refresh very often. I am not sure how this got there as I did not install any code for Cloudflare except the above that displays the Origin IP Address of each visitor, but even when I remove this, the banner is still there.
I opened a ticket with Cloudflare, however, does anyone have any ideas as to what's causing this? Could this be an iframe while using their CDN?
PhantomMenace wrote: ↑Thu Nov 22, 2018 6:21 pmit shows my real ip when usingin a custome page,Code: Select all
<? echo $ip=$_SERVER["HTTP_CF_CONNECTING_IP"]; if (!isset($ip)) { $ip = $_SERVER['REMOTE_ADDR']; }
is there a way to use this in my htaccess
Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing
Users browsing this forum: No registered users and 100 guests