Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public function __construct
  2. (
  3. MagentoFrameworkHTTPAdapterCurl $curl
  4. )
  5. {
  6. $this->curl = $curl;
  7. }
  8.  
  9. public function getGeoIpResponse($ip)
  10. {
  11. $this->curl->setConfig(['header' => false]);
  12. $this->curl->write('GET', $ip);
  13.  
  14. return $this->curl->read();
  15. }
  16.  
  17. public function __construct
  18. (
  19. MagentoFrameworkHTTPAdapterCurl $curl
  20. )
  21. {
  22. $this->curl = $curl;
  23. }
  24.  
  25. public function getFixerResponse($base) {
  26.  
  27. $this->curl->write('GET', $this->fixerUrl . $base);
  28.  
  29. $response = $this->curl->read();
  30.  
  31. return $response;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement