Fix: Missing the delete command
This commit is contained in:
parent
b89473383c
commit
c4ccf6f744
@ -28,7 +28,7 @@
|
|||||||
* @param string $postorget 'POST', 'GET', 'HEAD'
|
* @param string $postorget 'POST', 'GET', 'HEAD'
|
||||||
* @param string $param Parameters of URL (x=value1&y=value2)
|
* @param string $param Parameters of URL (x=value1&y=value2)
|
||||||
* @param string $followlocation 1=Follow location, 0=Do not follow
|
* @param string $followlocation 1=Follow location, 0=Do not follow
|
||||||
* @param array $addheaders Array of string to add into header. Example: ('Accept: application/xrds+xml', ....)
|
* @param array $addheaders Array of string to add into header. Example: array('Accept: application/xrds+xml', ....)
|
||||||
* @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
* @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||||
*/
|
*/
|
||||||
function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addheaders=array())
|
function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addheaders=array())
|
||||||
@ -83,6 +83,10 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea
|
|||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD'
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD'
|
||||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||||
}
|
}
|
||||||
|
else if ($postorget == 'DELETE')
|
||||||
|
{
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); // POST
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
curl_setopt($ch, CURLOPT_POST, 0); // GET
|
curl_setopt($ch, CURLOPT_POST, 0); // GET
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user