Coding style fixes

This commit is contained in:
Pellaeon Lin 2017-05-07 23:00:39 +08:00
parent 4b95547244
commit 7587622df4

View File

@ -1,5 +1,5 @@
<?php <?php
function curlgetContents( $url, $params, $post=false){ function curlgetContents($url, $params, $post = false){
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post ? $url : $url.'?'.http_build_query($params) ); curl_setopt($ch, CURLOPT_URL, $post ? $url : $url.'?'.http_build_query($params) );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@ -54,26 +54,26 @@ function curlgetContents( $url, $params, $post=false){
return array($body, $info, $header, $proxy_d); return array($body, $info, $header, $proxy_d);
} }
function curlgetSimpleHTMLDOM($url function curlgetSimpleHTMLDOM($url,
, $use_include_path = false $use_include_path = false,
, $context = null $context = null,
, $offset = 0 $offset = 0,
, $maxLen = null $maxLen = null,
, $lowercase = true $lowercase = true,
, $forceTagsClosed = true $forceTagsClosed = true,
, $target_charset = DEFAULT_TARGET_CHARSET $target_charset = DEFAULT_TARGET_CHARSET,
, $stripRN = true $stripRN = true,
, $defaultBRText = DEFAULT_BR_TEXT $defaultBRText = DEFAULT_BR_TEXT,
, $defaultSpanText = DEFAULT_SPAN_TEXT $defaultSpanText = DEFAULT_SPAN_TEXT
){ ){
list($body, $info, $header, $proxy) = curlgetContents($url, $use_include_path, $context, $offset, $maxLen); list($body, $info, $header, $proxy) = curlgetContents($url, $use_include_path, $context, $offset, $maxLen);
return array(str_get_html($body return array(str_get_html($body,
, $lowercase $lowercase,
, $forceTagsClosed $forceTagsClosed,
, $target_charset $target_charset,
, $stripRN $stripRN,
, $defaultBRText $defaultBRText,
, $defaultSpanText), $defaultSpanText),
$info, $header, $proxy); $info, $header, $proxy);// for debug purposes
} }
?> ?>