I was testing this module but because i'm behind a proxy it's not possible for me to use the "file_get_contents" function. I've modified my drupal such that drupal_http_request functions work with my proxy (http://drupal.org/node/7881)
I think it's good practice to use the drupal_http_request function instead of the standard php file_get_contents feature so I modified the stock api module to work with the drupal_http_request function.
I took the 5.x-1.0 version from 2007-Jun-02. And this is my modification:
line 102
$contents = @file_get_contents($url);
if ($contents) {
if ($data = explode(',', str_replace('"', '', $contents))) {
$data = array_map('trim', $data);
return $data;
}
}
becomes:
$contents = drupal_http_request($url);
if ($contents) {
if ($data = explode(',', str_replace('"', '', $contents->data))) {
$data = array_map('trim', $data);
return $data;
}
}
Comments
Comment #1
kbahey commentedhttp://drupal.org/node/218125