comparison index.php @ 42:3f400072bf14

merge, involved ediff3 wrt getAmazonInfo.php
author Charlie Root
date Sat, 05 Jan 2019 06:21:12 -0500
parents 1bb0bc3d306a
children dbc006408d2b
comparison
equal deleted inserted replaced
41:0578c6e438d3 42:3f400072bf14
1 <?php 1 <?php
2 $country_code = $_SERVER["GEOIP_COUNTRY_CODE"]; 2
3 switch($country_code){ 3 if (isset($_SERVER["GEOIP_COUNTRY_CODE"])) {
4 /* case "CA": 4 $country_code = $_SERVER["GEOIP_COUNTRY_CODE"];
5 Header( "HTTP/1.1 301 Moved Permanently" ); 5 }
6 Header ("Location: http://www.yournextread.com/ca/" ); 6 elseif (isset($_SERVER["REDIRECT_GEOIP_COUNTRY_CODE"])) {
7 break; 7 $country_code = $_SERVER["REDIRECT_GEOIP_COUNTRY_CODE"];
8 case "DE": 8 }
9 Header( "HTTP/1.1 301 Moved Permanently" ); 9 else {$country_code = "US" ; }
10 Header ("Location: http://www.yournextread.com/de/" ); 10 file_put_contents('/var/ywww/debug/phpDebug',
11 break; 11 "cc: $country_code\n",
12 case "FR": 12 FILE_APPEND);
13 Header( "HTTP/1.1 301 Moved Permanently" ); 13
14 Header ("Location: http://www.yournextread.com/fr/" ); 14 switch($country_code) {
15 break; 15 case "CA":
16 case "GB": 16 Header( "HTTP/1.1 301 Moved Permanently" );
17 Header( "HTTP/1.1 301 Moved Permanently" ); 17 Header ("Location: http://www.yournextread.com/ca/" );
18 Header ("Location: http://www.yournextread.com/uk/" ); 18 break;
19 break; 19 case "DE":
20 case "US": 20 Header( "HTTP/1.1 301 Moved Permanently" );
21 Header( "HTTP/1.1 301 Moved Permanently" ); 21 Header ("Location: http://www.yournextread.com/de/" );
22 Header ("Location: http://www.yournextread.com/us/" ); 22 break;
23 break; */ 23 case "FR":
24 default: 24 Header( "HTTP/1.1 301 Moved Permanently" );
25 Header( "HTTP/1.1 301 Moved Permanently" ); 25 Header ("Location: http://www.yournextread.com/fr/" );
26 Header ("Location: http://www.yournextread.com/us/" ); 26 break;
27 break; 27 case "GB":
28 } 28 Header( "HTTP/1.1 301 Moved Permanently" );
29 Header ("Location: http://www.yournextread.com/uk/" );
30 break;
31 case "US":
32 Header( "HTTP/1.1 301 Moved Permanently" );
33 Header ("Location: http://www.yournextread.com/us/" );
34 break;
35 default:
36 Header( "HTTP/1.1 301 Moved Permanently" );
37 Header ("Location: http://www.yournextread.com/us/" );
38 break;
39 }
29 ?> 40 ?>
30 <html> 41 <html>
31 <head> 42 <head>
32 <title>YourNextRead: Book Recommendations</title> 43 <title>YourNextRead: Book Recommendations</title>
33 44
34 <META NAME="Description" CONTENT="YourNextRead recommends your next book. YourNextRead provides a book recommendation system showing aggregated book reviews, updated by real peoples opinions, in a simple visual map, helping you to decide 'What Should I Read Next?'. Perfect for both bookworms and casual readers!"> 45 <META NAME="Description" CONTENT="YourNextRead recommends your next book. YourNextRead provides a book recommendation system showing aggregated book reviews, updated by real peoples opinions, in a simple visual map, helping you to decide 'What Should I Read Next?'. Perfect for both bookworms and casual readers!">
35 <meta name="google-site-verification" content="0XCtbGM_bvOH363P2XE6DVjh-APTICOREquY8F38T84" /> 46 <meta name="google-site-verification" content="0XCtbGM_bvOH363P2XE6DVjh-APTICOREquY8F38T84" />
36 </HEAD> 47 </HEAD>
37 <body> 48 <body>
49 <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=322bafc0-69fa-4664-8e1c-0b9159259748"></script>
38 </body> 50 </body>
39 51