Search
 
SCRIPT & CODE EXAMPLE
 

PHP

crul in laravel

$url="http://abc/api/xyz.php";  //url of 2nd website where data is to be send
$postdata = $data
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0)
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt ($ch, CURLOPT_POST, 1); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('Content-Type', 'application/json'));
$result = curl_exec ($ch); 

echo $result;  
curl_close($ch);
Comment

PREVIOUS NEXT
Code Example
Php :: get absolute path php file 
Php :: access json object in php 
Php :: laravel auth user in constructor 
Php :: laravel delete controller still cached 
Php :: check for an existing user laravel eloquent 
Php :: static modal 
Php :: php remove path from string url 
Php :: laravel db ssh 
Php :: laravel clone row 
Php :: Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes 
Php :: laravel check if object is empty 
Php :: create livewire component 
Php :: php replace string within string 
Php :: token delete laravel 
Php :: Fibonacci Series Program. in php 
Php :: php unset reference 
Php :: carbon now 
Php :: artisan make command 
Php :: maintaining serial number in laravel pagination table 
Php :: datetime blade laravel 
Php :: laravel truncate string laravel 8 
Php :: php if else 
Php :: php parse file 
Php :: update role spatie 
Php :: add css to gutenberg editor 
Php :: laravel route only and except 
Php :: if else if ternary php 
Php :: download pdf php 
Php :: get deleted value laravel 
Php :: if is front end wp 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =