Answers for "how to get file from url php"

PHP
7

php get file contents

<?php
file_get_contents("file.txt");
?>
Posted by: Guest on May-12-2020
0

download html content from url php

$c = curl_init('https://yourURLhere.com');
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
//curl_setopt(... other options you want...)

$html = curl_exec($c);

if (curl_error($c))
    die(curl_error($c));

// Get the status code
$status = curl_getinfo($c, CURLINFO_HTTP_CODE);

curl_close($c);
Posted by: Guest on August-28-2020

Code answers related to "how to get file from url php"

Browse Popular Code Answers by Language