Changeset 1319887
- Timestamp:
- 01/02/2016 01:03:10 PM (10 years ago)
- Location:
- thunder-port/trunk
- Files:
-
- 2 edited
-
simple_html_dom.php (modified) (1 diff)
-
thunder_port.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
thunder-port/trunk/simple_html_dom.php
r1319827 r1319887 1099 1099 { 1100 1100 $args = func_get_args(); 1101 $this->load(call_user_func_array('file_get_contents', $args), true); 1101 // $this->load(call_user_func_array('file_get_contents', $args), true); 1102 $this->load(call_user_func_array('file_get_contents_curl', $args), true); 1103 1102 1104 // Throw an error if we can't properly load the dom. 1103 1105 if (($error=error_get_last())!==null) { -
thunder-port/trunk/thunder_port.php
r1319884 r1319887 13 13 add_action( 'admin_menu', 'thunderport_add_admin_menu' ); 14 14 add_action( 'admin_init', 'thunderport_settings_init' ); 15 16 function file_get_contents_curl($url) { 17 $ch = curl_init(); 18 19 curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); 20 curl_setopt($ch, CURLOPT_HEADER, 0); 21 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 22 curl_setopt($ch, CURLOPT_URL, $url); 23 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); 24 25 $data = curl_exec($ch); 26 curl_close($ch); 27 28 return $data; 29 } 30 15 31 16 32 function curl_file_get_html($base) {
Note: See TracChangeset
for help on using the changeset viewer.