Search
 
SCRIPT & CODE EXAMPLE
 

PHP

curl get response headers php

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
// ...

$response = curl_exec($ch);

// Then, after your curl_exec call:
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($response, 0, $header_size);
$body = substr($response, $header_size);
Comment

PREVIOUS NEXT
Code Example
Php :: How to Show the Logged in Username in the WordPress 
Php :: php date function get previous month 
Php :: clear cache command in laravel controller 
Php :: php email attachment and message 
Php :: php group array by value and count 
Php :: get class name from object php 
Php :: push key value array php 
Php :: laravel validation unique email except self 
Php :: laravel add auto increment 
Php :: limited text show in laravel 
Php :: laravel server sent events 
Php :: boot add schema in laravel 
Php :: Command for single migration in larvel 
Php :: run xampp application on windows startup 
Php :: laravel migration make auto increment 
Php :: laravel checking if a record exists 
Php :: laravel blade loop if 
Php :: laravel validate datetime with datetime-local 
Php :: set cookie one day php 
Php :: Laravel: Validation unique on update 
Php :: php post request 
Php :: command to create model with migration in laravel 
Php :: how to get match date and month in php 
Php :: laravel wherin softdelete 
Php :: remove last character from string php 
Php :: laravel detach 
Php :: php migrate comand 
Php :: validation file in laravel 
Php :: laravel insert array 
Php :: __dir__ in php 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =