Version Notes
Stable release working for all Magento versions from 1.5 and up
Download this release
Release Info
Developer | Martin Wickings |
Extension | BlockThatProxy |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1.0
- app/code/local/BlockThatProxy/Proxy/Block/Feed.php +41 -39
- package.xml +12 -24
app/code/local/BlockThatProxy/Proxy/Block/Feed.php
CHANGED
@@ -105,45 +105,7 @@ class BlockThatProxy_Proxy_Block_Feed extends Mage_Core_Block_Template
|
|
105 |
}
|
106 |
|
107 |
}
|
108 |
-
|
109 |
-
{
|
110 |
-
$headers = array();
|
111 |
-
foreach(array_keys($_SERVER) as $skey){
|
112 |
-
$headers[$skey] = $_SERVER[$skey];
|
113 |
-
}
|
114 |
-
$header_str='';
|
115 |
-
foreach ($headers as $header => $value)
|
116 |
-
{
|
117 |
-
|
118 |
-
if ($header == "REMOTE_ADDR")
|
119 |
-
{
|
120 |
-
$ip = "ip=".$value;
|
121 |
-
}
|
122 |
-
$header_str .= $header."=".$value."~\n";
|
123 |
-
}
|
124 |
-
$post_string = "data=".urlencode($header_str)."&".$ip."&hash=".$hash;
|
125 |
-
|
126 |
-
$ch = curl_init();
|
127 |
-
curl_setopt($ch, CURLOPT_URL, "http://www.blockthatproxy.com/detect.aspx");
|
128 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
129 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
|
130 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
131 |
-
curl_setopt($ch, CURLOPT_USERAGENT, "");
|
132 |
-
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
133 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
134 |
-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
135 |
-
curl_setopt($ch, CURLOPT_HEADER, true);
|
136 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
137 |
-
$contents = curl_exec($ch);
|
138 |
-
curl_close($ch);
|
139 |
-
|
140 |
-
$proxy_level = intval(substr($contents, -2));
|
141 |
-
|
142 |
-
if ($proxy_level > 3)
|
143 |
-
return true;
|
144 |
-
else
|
145 |
-
return false;
|
146 |
-
}
|
147 |
|
148 |
function checkDistanceApi($hash,$addcity,$countryName)
|
149 |
{
|
@@ -211,4 +173,44 @@ class BlockThatProxy_Proxy_Block_Feed extends Mage_Core_Block_Template
|
|
211 |
else
|
212 |
return -1;
|
213 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
105 |
}
|
106 |
|
107 |
}
|
108 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
function checkDistanceApi($hash,$addcity,$countryName)
|
111 |
{
|
173 |
else
|
174 |
return -1;
|
175 |
}
|
176 |
+
|
177 |
+
function check4proxy($hash)
|
178 |
+
{
|
179 |
+
$headers = array();
|
180 |
+
foreach(array_keys($_SERVER) as $skey){
|
181 |
+
$headers[$skey] = $_SERVER[$skey];
|
182 |
+
}
|
183 |
+
$header_str='';
|
184 |
+
foreach ($headers as $header => $value)
|
185 |
+
{
|
186 |
+
|
187 |
+
if ($header == "REMOTE_ADDR")
|
188 |
+
{
|
189 |
+
$ip = "ip=".$value;
|
190 |
+
}
|
191 |
+
$header_str .= $header."=".$value."~\n";
|
192 |
+
}
|
193 |
+
$post_string = "data=".urlencode($header_str)."&".$ip."&hash=".$hash;
|
194 |
+
|
195 |
+
$ch = curl_init();
|
196 |
+
curl_setopt($ch, CURLOPT_URL, "http://www.blockthatproxy.com/detect.aspx");
|
197 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
198 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
|
199 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
200 |
+
curl_setopt($ch, CURLOPT_USERAGENT, "");
|
201 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
202 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
203 |
+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
204 |
+
curl_setopt($ch, CURLOPT_HEADER, true);
|
205 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
206 |
+
$contents = curl_exec($ch);
|
207 |
+
curl_close($ch);
|
208 |
+
|
209 |
+
$proxy_level = intval(substr($contents, -2));
|
210 |
+
|
211 |
+
if ($proxy_level > 3)
|
212 |
+
return true;
|
213 |
+
else
|
214 |
+
return false;
|
215 |
+
}
|
216 |
}
|
package.xml
CHANGED
@@ -1,32 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>BlockThatProxy</name>
|
4 |
-
<version>2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
-
<license
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>This extension integrates the
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
-
|
18 |
-
|
19 |
-
- You can choose to redirect a user to a specific page if the user is detected as proxy during checkout (after payment!). In this way you can automatically ask the customer to contact you to confirm his details.
|
20 |
-
|
21 |
-
- The system looks up the users IP in our global IP to address database and provide you with the country and city the IP belongs to.
|
22 |
-
|
23 |
-
- It calculates the distance between the shipping address entered by the user, and the address matching the IP, so you can see if its a very high distance (possible fraud).
|
24 |
-
|
25 |
-
- Adds an page to your admin panel, where you easily can see all orders marked as possible fraud.</notes>
|
26 |
-
<authors><author><name>Martin</name><user>auto-converted</user><email>martin@wickings.dk</email></author></authors>
|
27 |
-
<date>2011-02-16</date>
|
28 |
-
<time>22:02:13</time>
|
29 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="proxy.xml" hash="749eb6b9f97531a78924e8932ad26d2e"/></dir><dir name="template"><dir name="proxy"><dir name="Misc"><file name="Errors.phtml" hash="436e57bf38548227cd36bd3385eb97ac"/></dir><dir name="Order"><dir name="Edit"><dir name="Tab"><file name="Deliveries.phtml" hash="c223d7961de6b0d756ad7f35bc84e89b"/><file name="Info.phtml" hash="5202a5f25892e3d412aae5a1a4721bad"/><file name="Products.phtml" hash="aa6e7035df6c205daba994535adc36fe"/><file name="ProductSelection.phtml" hash="93d1562b161fee72e63a19c82857126b"/><file name="SendToSupplier.phtml" hash="338a7a8da444eaf3b056789d9910790d"/></dir></dir><file name="Grid.phtml" hash="d6b6f706833ee7921241c8dd5216b225"/><file name="ImportFromSupplyNeeds.phtml" hash="9b89a56a4b8426e112f4238df9098b4b"/><file name="New.phtml" hash="afb4d550e1edaeec3d1772de4b014645"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="proxy.xml" hash="8559ef08e002869ee52dc61ecebb09a0"/></dir><dir name="template"><dir name="proxy"><file name="feed.phtml" hash="a80df077e1a4703e70e2b39f58ac02fd"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="BlockThatProxy"><dir name="Proxy"><dir name="Block"><dir name="Adminhtml"><file name="page.php" hash="e857c09781e4d5b2f4dcbbd02864cc7c"/></dir><dir name="Order"><dir name="Edit"><dir name="Tabs"><file name="Deliveries.php" hash="81b8fd2689d4a718af73bb636c0d22e4"/><file name="Info.php" hash="90ef41668a307f6868566cc90370d9e9"/><file name="Products.php" hash="5715be0c5cbbb5b99ced16360f5fd1e8"/><file name="ProductSelection.php" hash="54977e1bcf25c7c3de848d9370bb71d7"/><file name="SendToSupplier.php" hash="da4c662619fa7f5d45a5bf4cf6636306"/></dir><file name="Form.php" hash="b94f8e0d8d5baf6dd7def12b4fa76cf1"/><file name="Tabs.php" hash="d6e3d6157b82b13f426d1ca5ac0b3daa"/></dir><file name="Edit.php" hash="bfee68ee9ebf1dfa0a99f34ab4388250"/><file name="Grid.php" hash="fb118242ff851c0b8f8d766773690e5a"/><file name="New.php" hash="3659bb0e883f8384b6d14f333d1d18ee"/></dir><file name="Feed.php" hash="4ff0aba956fb8462e647e9a505522224"/><file name="Index.php" hash="0ec01dbf7a02f6baf8183e28a8522e92"/></dir><dir name="controllers"><file name="FeedController.php" hash="30e9a036f5f9e73c8dc033914120847c"/><file name="IndexController.php" hash="30f3bd336eb73f41b03b62bbd435c5d0"/><file name="OrdersController.php" hash="4b5293ba6002f0ca7923cae76c6e3ea0"/></dir><dir name="etc"><file name="config.xml" hash="91d7cdce94348e827e1e9a6f3a5fd940"/><file name="system.xml" hash="ce81ee9798d74dadc07efa5a1ba4b643"/></dir><dir name="Helper"><file name="Data.php" hash="d75e65e52a560dfb49b007c943cf7789"/></dir><dir name="Model"><dir name="Config"><file name="Redirectpage.php" hash="ee6a80ddd7cd83772bed383c4fbe4fa9"/></dir><dir name="Mysql4"><dir name="Feed"><file name="Collection.php" hash="d5f619ce7db798fbf597ad056531c11d"/></dir><dir name="Order"><file name="Collection.php" hash="49ed750fa03021b2bd09ca36b8cc8e04"/></dir><file name="Feed.php" hash="e466c024bf2314050064a80cbccc7b58"/><file name="Order.php" hash="ab5412725756f59ce9279083ca2a1e65"/></dir><dir name="MySql14"><dir name="Proxy"><file name="Collection.php" hash="a86451f979847ed72c0485b4628ba817"/></dir><file name="Proxy.php" hash="375ba8e8577a1551a263d4da1e49d7a8"/></dir><file name="Feed.php" hash="2cdc320e354b7169e68c30b642d3cdba"/><file name="Observer.php" hash="23bf3b44d31683ed98b5cc2eb071501c"/><file name="Order.php" hash="ac3534a7ea4e8e964f11cba7048989eb"/><file name="Proxy.php" hash="f219ced3c0b31e1a7f5b3a6afa89ef91"/><file name="Status.php" hash="64d3de8c5121947e2924343af9d7f289"/></dir><dir name="sql"><dir name="proxy_setup"><file name="mysql4-install-0.1.0.php" hash="495618f16a8e4a91bb5062c8ce2b5651"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="145cee245c5f1723901527e69bdf96cc"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BlockThatProxy_Proxy.xml" hash="6a23fce1757d829bba13f9f1a3c8e71e"/></dir></target></contents>
|
30 |
<compatible/>
|
31 |
-
<dependencies
|
32 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>BlockThatProxy</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>This extension integrates the fraud- and proxy detection service from BlockThatProxy.com</summary>
|
10 |
+
<description>This extension integrates the fraud- and proxy detection service from BlockThatProxy.com
|
11 |
+

|
12 |
+
After install, you need to create a free account on blockthatproxy.com to get the key required for it to run.</description>
|
13 |
+
<notes>Stable release working for all Magento versions from 1.5 and up</notes>
|
14 |
+
<authors><author><name>Martin Wickings</name><user>Wickings</user><email>martin@wickings.dk</email></author></authors>
|
15 |
+
<date>2013-04-24</date>
|
16 |
+
<time>13:19:29</time>
|
17 |
+
<contents><target name="magelocal"><dir name="BlockThatProxy"><dir name="Proxy"><dir name="Block"><dir name="Adminhtml"><file name="page.php" hash="e857c09781e4d5b2f4dcbbd02864cc7c"/></dir><file name="Feed.php" hash="80bf5cc692c047119f8dd9f9e8cf2c6a"/><file name="Index.php" hash="0ec01dbf7a02f6baf8183e28a8522e92"/><dir name="Order"><dir name="Edit"><file name="Form.php" hash="b94f8e0d8d5baf6dd7def12b4fa76cf1"/><dir name="Tabs"><file name="Deliveries.php" hash="81b8fd2689d4a718af73bb636c0d22e4"/><file name="Info.php" hash="90ef41668a307f6868566cc90370d9e9"/><file name="ProductSelection.php" hash="54977e1bcf25c7c3de848d9370bb71d7"/><file name="Products.php" hash="5715be0c5cbbb5b99ced16360f5fd1e8"/><file name="SendToSupplier.php" hash="da4c662619fa7f5d45a5bf4cf6636306"/></dir><file name="Tabs.php" hash="d6e3d6157b82b13f426d1ca5ac0b3daa"/></dir><file name="Edit.php" hash="bfee68ee9ebf1dfa0a99f34ab4388250"/><file name="Grid.php" hash="fb118242ff851c0b8f8d766773690e5a"/><file name="New.php" hash="3659bb0e883f8384b6d14f333d1d18ee"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d75e65e52a560dfb49b007c943cf7789"/></dir><dir name="Model"><dir name="Config"><file name="Redirectpage.php" hash="ee6a80ddd7cd83772bed383c4fbe4fa9"/></dir><file name="Feed.php" hash="2cdc320e354b7169e68c30b642d3cdba"/><dir name="MySql14"><dir name="Proxy"><file name="Collection.php" hash="a86451f979847ed72c0485b4628ba817"/></dir><file name="Proxy.php" hash="375ba8e8577a1551a263d4da1e49d7a8"/></dir><dir name="Mysql4"><dir name="Feed"><file name="Collection.php" hash="d5f619ce7db798fbf597ad056531c11d"/></dir><file name="Feed.php" hash="e466c024bf2314050064a80cbccc7b58"/><dir name="Order"><file name="Collection.php" hash="49ed750fa03021b2bd09ca36b8cc8e04"/></dir><file name="Order.php" hash="ab5412725756f59ce9279083ca2a1e65"/></dir><file name="Observer.php" hash="23bf3b44d31683ed98b5cc2eb071501c"/><file name="Order.php" hash="ac3534a7ea4e8e964f11cba7048989eb"/><file name="Proxy.php" hash="f219ced3c0b31e1a7f5b3a6afa89ef91"/><file name="Status.php" hash="64d3de8c5121947e2924343af9d7f289"/></dir><dir name="controllers"><file name="FeedController.php" hash="30e9a036f5f9e73c8dc033914120847c"/><file name="IndexController.php" hash="30f3bd336eb73f41b03b62bbd435c5d0"/><file name="OrdersController.php" hash="4b5293ba6002f0ca7923cae76c6e3ea0"/></dir><dir name="etc"><file name="config.xml" hash="91d7cdce94348e827e1e9a6f3a5fd940"/><file name="system.xml" hash="ce81ee9798d74dadc07efa5a1ba4b643"/></dir><dir name="sql"><dir name="proxy_setup"><file name="mysql4-install-0.1.0.php" hash="495618f16a8e4a91bb5062c8ce2b5651"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="145cee245c5f1723901527e69bdf96cc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="proxy.xml" hash="749eb6b9f97531a78924e8932ad26d2e"/></dir><dir name="template"><dir name="proxy"><dir name="Misc"><file name="Errors.phtml" hash="436e57bf38548227cd36bd3385eb97ac"/></dir><dir name="Order"><dir name="Edit"><dir name="Tab"><file name="Deliveries.phtml" hash="c223d7961de6b0d756ad7f35bc84e89b"/><file name="Info.phtml" hash="5202a5f25892e3d412aae5a1a4721bad"/><file name="ProductSelection.phtml" hash="93d1562b161fee72e63a19c82857126b"/><file name="Products.phtml" hash="aa6e7035df6c205daba994535adc36fe"/><file name="SendToSupplier.phtml" hash="338a7a8da444eaf3b056789d9910790d"/></dir></dir><file name="Grid.phtml" hash="d6b6f706833ee7921241c8dd5216b225"/><file name="ImportFromSupplyNeeds.phtml" hash="9b89a56a4b8426e112f4238df9098b4b"/><file name="New.phtml" hash="afb4d550e1edaeec3d1772de4b014645"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="proxy.xml" hash="8559ef08e002869ee52dc61ecebb09a0"/></dir><dir name="template"><dir name="proxy"><file name="feed.phtml" hash="a80df077e1a4703e70e2b39f58ac02fd"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BlockThatProxy_Proxy.xml" hash="6a23fce1757d829bba13f9f1a3c8e71e"/></dir></target></contents>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.13</min><max>5.4.14</max></php></required></dependencies>
|
20 |
</package>
|