Changeset 2638113
- Timestamp:
- 12/01/2021 02:50:11 PM (4 years ago)
- Location:
- raccoon-platform/trunk
- Files:
-
- 5 edited
-
Raccoon-platform.php (modified) (1 diff)
-
Readme.txt (modified) (1 diff)
-
include/Popular_items.php (modified) (4 diffs)
-
include/ingest_event.php (modified) (6 diffs)
-
include/ingest_session.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
raccoon-platform/trunk/Raccoon-platform.php
r2635162 r2638113 8 8 * Plugin URI: https://raccoonplatform.com 9 9 * Description: More informed customers reflect more sales. Here are the features you get from using Raccoon. 10 * Version: 4. 5.010 * Version: 4.6.0 11 11 * License: GPLv2 or Later 12 12 * Text Domain: Raccoon-Platform -
raccoon-platform/trunk/Readme.txt
r2635151 r2638113 6 6 Tested up to: 5.7.2 7 7 <<<<<<< .mine 8 Stable tag: 4. 5.08 Stable tag: 4.6.0 9 9 Requires PHP: 7.0 10 10 License: GPLv3 or later -
raccoon-platform/trunk/include/Popular_items.php
r2635151 r2638113 8 8 function callApiPopularAtc() 9 9 { 10 try {10 // try { 11 11 global $client_api; 12 12 $apiKey = $client_api; … … 19 19 $response = wp_remote_get('http://95.111.240.80/recommend/popular_items/' . $apiKey . '/' . $action . '/' . $number_items , $headers ); 20 20 $this->output = wp_remote_retrieve_body( $response ); 21 } catch (Exception $e) {22 echo 'Caught exception: ', $e->getMessage(), "\n";23 wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );24 }21 // } catch (Exception $e) { 22 // echo 'Caught exception: ', $e->getMessage(), "\n"; 23 // wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers ); 24 // } 25 25 } 26 26 public function viewPopularAtc() … … 39 39 function callApiPopularView() 40 40 { 41 try {41 // try { 42 42 global $client_api; 43 43 $apiKey = $client_api; … … 48 48 ); 49 49 $request = wp_remote_get( 'http://95.111.240.80/log/Production_Logging:callApiPopularView',array( 'sslverify' => false , 'timeout' => 5 ) ); 50 if( is_wp_error( $request ) ) { 51 echo '<script language="javascript">'; 52 echo 'alert("'.$request->get_error_message().'");'; 53 echo 'alert("'.$request->get_error_code().'");'; 54 echo '</script>'; 55 return false; // Bail early 56 } 50 57 51 $response = wp_remote_get('http://95.111.240.80/recommend/popular_items/' . $apiKey . '/' . $action . '/' . $number_items , $headers ); 58 52 $this->output = wp_remote_retrieve_body( $response ); 59 } catch (Exception $e) {60 echo 'Caught exception: ', $e->getMessage(), "\n";61 wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );62 }53 // } catch (Exception $e) { 54 // echo 'Caught exception: ', $e->getMessage(), "\n"; 55 // wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers ); 56 // } 63 57 } 64 58 -
raccoon-platform/trunk/include/ingest_event.php
r2633844 r2638113 59 59 } 60 60 } 61 // get Istatus 62 $min = 0; 63 $max = 2; 64 $istatus = rand($min, $max); 61 65 $headers = array( 62 66 'Content-Type:application/json', 63 67 ); 64 try {68 // try { 65 69 wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiProduct_add' , $headers); 66 70 $response = wp_remote_post( 'http://95.111.240.80/ingest/event', array( … … 83 87 'iname' => $name, 84 88 'iprice' => $price_product, 85 'istatus' => 189 'istatus' => $istatus 86 90 ), 87 91 ) … … 90 94 ) 91 95 ); 92 } catch (Exception $e) {93 echo 'Caught exception: ', $e->getMessage(), "\n";94 wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );95 96 }96 // } catch (Exception $e) { 97 // echo 'Caught exception: ', $e->getMessage(), "\n"; 98 // wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers ); 99 // 100 // } 97 101 } 98 102 } … … 116 120 //get date now 117 121 $now = new DateTime(); 122 // get Istatus 123 $min = 0; 124 $max = 2; 125 $istatus = rand($min, $max); 118 126 $headers = array( 119 127 'Content-Type:application/json', 120 128 ); 121 try {129 // try { 122 130 wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiProduct_View' , $headers); 123 131 … … 142 150 'iname' => $name, 143 151 'iprice' => $price, 144 'istatus' => 1152 'istatus' => $istatus 145 153 ), 146 154 ) … … 149 157 ) 150 158 ); 151 } catch (Exception $e) {152 echo 'Caught exception: ', $e->getMessage(), "\n";153 wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );154 159 155 } 160 // } catch (Exception $e) { 161 // echo 'Caught exception: ', $e->getMessage(), "\n"; 162 // wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers ); 163 // 164 // } 156 165 } 157 166 } -
raccoon-platform/trunk/include/ingest_session.php
r2633844 r2638113 1 1 <?php 2 2 class RaccoonIngestSession 3 {3 { 4 4 public function ingest_session() 5 5 { … … 22 22 'Content-Type:application/json', 23 23 ); 24 try {24 // try { 25 25 wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiSession' , $headers); 26 26 $url = 'http://95.111.240.80:5000/recommend/ingest_session'; … … 41 41 ) 42 42 ); 43 } catch (Exception $e) {44 echo 'Caught exception: ', $e->getMessage(), "\n";45 wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );46 }43 // } catch (Exception $e) { 44 // echo 'Caught exception: ', $e->getMessage(), "\n"; 45 // wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers ); 46 // } 47 47 } 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.