|
@@ -1,32 +1,40 @@
|
|
|
<?php
|
|
|
|
|
|
-* Simple cURL class to fetch a web page
|
|
|
-* Properly redirects even with safe mode and basedir restrictions
|
|
|
-* Can provide simple post options to a page
|
|
|
-*
|
|
|
-* Load class
|
|
|
-* Initiate as
|
|
|
-* - $fetch_data = new cURL_fetch_web_data();
|
|
|
-* - optionaly pass an array of cURL options and redirect count
|
|
|
-* - cURL_fetch_web_data(cURL options array, Max redirects);
|
|
|
-* - $fetch_data = new cURL_fetch_web_data(array(CURLOPT_SSL_VERIFYPEER => 1), 5);
|
|
|
-*
|
|
|
-* Make the call
|
|
|
-* - $fetch_data('http://www.simplemachines.org');
|
|
|
-* - $fetch_data('http://www.simplemachines.org', array('user' => 'name', 'password' => 'password'));
|
|
|
-* - $fetch_data('http://www.simplemachines.org', parameter1¶meter2¶meter3);
|
|
|
-*
|
|
|
-*
|
|
|
-* Get the data
|
|
|
-* - $fetch_data->result('body');
|
|
|
-* - $fetch_data->result();
|
|
|
-* - $fetch_data->result_raw();
|
|
|
-* - $fetch_data->result_raw(0);
|
|
|
-*
|
|
|
-*/
|
|
|
+ *
|
|
|
+ * Simple Machines Forum (SMF)
|
|
|
+ * Simple cURL class to fetch a web page
|
|
|
+ * Properly redirects even with safe mode and basedir restrictions
|
|
|
+ * Can provide simple post options to a page
|
|
|
+ *
|
|
|
+ * Load class
|
|
|
+ * Initiate as
|
|
|
+ * - $fetch_data = new cURL_fetch_web_data();
|
|
|
+ * - optionaly pass an array of cURL options and redirect count
|
|
|
+ * - cURL_fetch_web_data(cURL options array, Max redirects);
|
|
|
+ * - $fetch_data = new cURL_fetch_web_data(array(CURLOPT_SSL_VERIFYPEER => 1), 5);
|
|
|
+ *
|
|
|
+ * Make the call
|
|
|
+ * - $fetch_data('http://www.simplemachines.org');
|
|
|
+ * - $fetch_data('http://www.simplemachines.org', array('user' => 'name', 'password' => 'password'));
|
|
|
+ * - $fetch_data('http://www.simplemachines.org', parameter1¶meter2¶meter3);
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * Get the data
|
|
|
+ * - $fetch_data->result('body');
|
|
|
+ * - $fetch_data->result();
|
|
|
+ * - $fetch_data->result_raw();
|
|
|
+ * - $fetch_data->result_raw(0);
|
|
|
+ *
|
|
|
+ * @package SMF
|
|
|
+ * @author Simple Machines http:
|
|
|
+ * @copyright 2011 Simple Machines
|
|
|
+ * @license http:
|
|
|
+ *
|
|
|
+ * @version 2.1 Alpha 1
|
|
|
+ */
|
|
|
|
|
|
if (!defined('SMF'))
|
|
|
-die('Hacking attempt...');
|
|
|
+ die('Hacking attempt...');
|
|
|
|
|
|
class curl_fetch_web_data
|
|
|
{
|
|
@@ -290,4 +298,3 @@ class curl_fetch_web_data
|
|
|
return strlen($header);
|
|
|
}
|
|
|
}
|
|
|
-?>
|