Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get header respnse code php curl

$url = 'http://www.example.com';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, true);    // we want headers
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$output = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo 'HTTP code: ' . $httpcode;
Comment

PREVIOUS NEXT
Code Example
Php :: how to use javascript variable in php 
Php :: laravel make seeder 
Php :: php mkdir 
Php :: laravel/framework[v8.75.0, ..., 8.x-dev] require league/flysystem ^1.1 - satisfiable by league/flysystem[1.1.0, ..., 1.x-dev]. 
Php :: how to uninstall php from mac catalina completely 
Php :: php 7.4 modules list 
Php :: php in javascript 
Php :: check if user has role twig 
Php :: how to pass id through get template part 
Php :: check if session is set 
Php :: php multidimensional array get all values by key 
Php :: laravel migration seed fresh 
Php :: interface x trait in php 
Php :: php convert array to number 
Php :: php upload from url 
Php :: laravel share on whatsapp link 
Php :: laravel blade image 
Php :: str_replace php 
Php :: where not null in laravel 
Php :: laravel migration change column default 
Php :: laravel group routes 
Php :: php var dump into string 
Php :: codeigniter redirect 
Php :: upgrade php linux 
Php :: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known 
Php :: how to change date formate in laravel 
Php :: laravel elasticsearch migration in laravel 
Php :: laravel websockets onsubscribe 
Php :: get count laravel 
Php :: php isset post 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =