Forum what does the egr valve do Upgrading Your Zen Cart Upgrading what does the egr valve do from 1.3.x to 1.5.x v153 A custom code run well on 139H but does not work on V153 after upgraded If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
I have a custom code working on my previous site(v139H), but since upgrade to V153, it seems does not work. The code located at index.php to automatically redirect IPs that from Canada to my .ca site. Code here: function ip2Ipv ($IPaddr) {//$ipaddress = getenv(REMOTE_ADDR); if ($IPaddr == "") { return what does the egr valve do 0; } else { $ips = split ("\.", "$IPaddr"); return ($ips[3] + $ips[2] * 256 + $ips[1] * 65536 + $ips[0] * 16777216); } } function getGeoCountryFromDB($ip) { // $url="http://api.geoio.com/q.php?key=ZJSxXUl6UGPtSuiw&qt=geoip&d=comma&q=".$ip; // $handle = @fopen($url, "r"); // if ($handle and 0) { // $buffer = fgets($handle, 4096); // $bbb=split(",",$buffer); // fclose($handle); // return $bbb[6]; // } else { $ipv=ip2Ipv($ip); $sql="select countrySHORT as countrycode from ipcountry where ipFROM<=$ipv and ipTO>=$ipv"; $re=mysql_query($sql); if (!mysql_errno()){ if (mysql_num_rows($re)>0) what does the egr valve do { $country_code=mysql_result($re,0,"countrycode"); if (strlen($country_code)<2) what does the egr valve do { $country_code=""; } } else { $country_code=""; } } else { $country_code=""; } // } return $country_code; } $ipaddress = getenv(REMOTE_ADDR); $country_code=getGeoCountryFromDB($ipaddress); // echo $ipaddress.$country_code;exit; what does the egr valve do // var_dump($_GET);exit; if ($country_code=="CA" and (empty($_GET) or ($_GET['main_page']=="index" and !isset($_GET['cPath'])) and $_GET['from']!='flag')) { header("Location:http://megadiscstore.ca"); exit; } Database upgraded and work no problem, website work no error, just never redirect all Canadian IPs. Any one can help me that would be very much appreciated. what does the egr valve do Mike
Join Date Nov 2010 Posts 9 Plugin Contributions 0
Thank you for such quick reply, i will try it to see. The code was from one of my friend, it`s not business, no issue at all. Welcome and by-the-way it's not just a simple change of adding the letter I after mysql. Some functions (and I didn't review each one used) either are completely different or non-existent. Regardless there is additional database access information needed to be included in many if not all of the replacement functions. The specific format can be found in the php manual by searching for php and include the mysql_ function. Once there the mysqli_ equivalent should be linked.
Everywhere you see mysql_ needs to be replaced with the mysqli_ equivalent or use the zen cart code that would provide the desired results without concern of the php version. It would be smartest to use the built-in Zen Cart functions for talking to the database, instead of using mysql_ or mysqli_ calls directly. Plus, you have code for old PHP regex functions that no longer exist, what does the egr valve do like split(). You can modernize those parts of your code by following the instructions here: http://www.zen-cart.com/entry.php?6-...nd-5-5-and-5-6
. Zen Cart - putting the dream of business ownership within reach of anyone! Donations always welcome: www.zen-cart.com/donate Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance. what does the egr valve do Furthermore, any advice you see here about PCI matters is merely an opinion , and should not be relied upon as "official". Official what does the egr valve do PCI information should be obtained what does the egr valve do from the PCI Security Council directly or from one of their authorized Assessors.
Replies: 12
-- Zen Cart 2015 -- vB4 Default Style -- Default Mobile Style
No comments:
Post a Comment