Skip to content

Commit

Permalink
Fix curl CURLOPT_VERBOSE parameter and pass booleans and not integers…
Browse files Browse the repository at this point in the history
… for the prettier.
  • Loading branch information
cafuego committed Apr 10, 2012
1 parent 281f0f1 commit 8747a68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internode.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ function fetch_data($url) {
$o = curl_init();

curl_setopt($o, CURLOPT_URL, $url);
curl_setopt($o, CURL_VERBOSE, 1);
curl_setopt($o, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($o, CURLOPT_GET, 1);
curl_setopt($o, CURLOPT_VERBOSE, TRUE);
curl_setopt($o, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($o, CURLOPT_GET, TRUE);
curl_setopt($o, CURLOPT_USERPWD, INTERNODE_USERNAME . ':' . INTERNODE_PASSWORD);
curl_setopt($o, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

curl_setopt($o, CURLOPT_USERAGENT, sprintf("internode.php/v.%d (Copyright 2004 - 2012 Intellectual Property Holdings Pty. Ltd.)", INTERNODE_VERSION ) );
curl_setopt($o, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($o, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($o, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($o, CURLOPT_SSL_VERIFYHOST, FALSE);

$result = curl_exec($o); // run the whole process

Expand Down

0 comments on commit 8747a68

Please sign in to comment.