FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
CurlRequest.php
Go to the documentation of this file.
1
<?php
2
/*
3
This program is free software; you can redistribute it and/or
4
modify it under the terms of the GNU General Public License
5
version 2 as published by the Free Software Foundation.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License along
13
with this program; if not, write to the Free Software Foundation, Inc.,
14
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
28
namespace
Fossology\Lib\Application
;
29
34
class
CurlRequest
35
{
40
private
$handle
= null;
41
46
public
function
__construct
($url)
47
{
48
$this->handle = curl_init($url);
49
}
50
55
public
function
setOptions
($options)
56
{
57
curl_setopt_array($this->handle, $options);
58
}
59
64
public
function
execute
()
65
{
66
return
curl_exec($this->handle);
67
}
68
74
public
function
getInfo
($resource)
75
{
76
return
curl_getinfo($this->handle, $resource);
77
}
78
82
public
function
close
()
83
{
84
curl_close($this->handle);
85
}
86
}
Fossology\Lib\Application\CurlRequest\setOptions
setOptions($options)
Definition:
CurlRequest.php:55
Fossology\Lib\Application\CurlRequest\close
close()
Definition:
CurlRequest.php:82
Fossology\Lib\Application\CurlRequest\getInfo
getInfo($resource)
Definition:
CurlRequest.php:74
Fossology\Lib\Application
Utility functions for specific applications.
Fossology\Lib\Application\CurlRequest\execute
execute()
Definition:
CurlRequest.php:64
Fossology\Lib\Application\CurlRequest\$handle
$handle
Definition:
CurlRequest.php:40
Fossology\Lib\Application\CurlRequest
Handle curl requests.
Definition:
CurlRequest.php:34
Fossology\Lib\Application\CurlRequest\__construct
__construct($url)
Definition:
CurlRequest.php:46
src
lib
php
Application
CurlRequest.php
Generated on Mon Jun 29 2020 12:03:42 for FOSSology by
1.8.11