Reputation: 351
Although "slightly" related to a previous question, it is different. How "secure" is this code in terms of cURL? Are there any other "bits" that should/ought to be added. Note it is not being used to pass "sensitive" info.
$ch = curl_init("http://www.example.com/test.xml");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data = curl_exec($ch);
curl_close($ch);
Upvotes: 0
Views: 129
Reputation: 27553
Few things to note:
Your code is not insecure, nor is it wrong. It just does not handle edge-cases and could be hardened.
Upvotes: 1