Answers for "php url to file"

PHP
1

php file get content replacing & with &

$myUrl = 'https://www.myurl.com?';
$myArray = [
    'foo' => 'fooString',
    'bar' => 'barString'
];
$myUrl .= http_build_query($myArray,'','&'); // https://www.myurl.com?foo=fooString&bar=barString
$myData = file_get_contents($myUrl);
Posted by: Guest on May-01-2020
1

transfer file using file_get_content

file_get_contents('http://url/to/upload/handler', false, $context);
Posted by: Guest on March-24-2020

Browse Popular Code Answers by Language