I'm just wondering if this module could function without the CURL extension. I am not a php developer but looked into the code and saw that it only fetches data via curl and could this be performed via fsockopen(). My hosting service provider doesn't support curl and they suggested to use fsockopen instead if possible. If someone could look at the code and tell me I could hire a developer and code it for me. Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | amazontools_curl_removing.patch | 793 bytes | bicou |
Comments
Comment #1
bicou commentedOn my system (Ubuntu/2.6.20-16-generic, Apache/2.0 and PHP/5.2.1), I tried using fopen and drupal_http_request. The only difference between the two results were :
- different RequestId and RequestProcessingTime (of course)
- different user agent : ' Value="Drupal (+http://drupal.org/)"' is added right after 'Name="UserAgent"'
(Amazon's servers send us back the UserAgent we sent them, and as drupal sends its own user agent, it is different than the one used by php)
Hence, I think we should use drupal_http_request and remove cURL from the required software list (I don't have cURL installed on the server).
I attached a patch with my modifications, the module was 100% working and 100% not using cURL.
Comment #2
bomarmonk commentedPatch is for amazon.php4.inc, by the way. It didn't apply cleanly, but I made the change by hand and there are no more cURL related errors. However, my CCK content will not display the amazon data. Does a corresponding change need to be made to ASIN/ISBN module for CCK? Thanks for any suggestions as to what might be wrong.
Comment #3
wayland76 commentedComment #4
wayland76 commentedhttp://drupal.org/node/143565
Similar node
Comment #5
MGParisi commentedNo longer supports 4.X! Sorry