Skip to content

file_get_contents #7

@malsatin

Description

@malsatin

Есть мнение, что делать запросы по https через функцию file_get_contents - это не лучшая идея. Предлагаю вместо этого использовать что-то вроде

	public function httpGetContents($url) {
		$curl = curl_init();

		curl_setopt($curl, CURLOPT_URL, $url);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

		$result = curl_exec($curl);
		curl_close($curl);

		return $result;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions