Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to send data from one website to another 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 :: delete directory from laravel storage 
Php :: laravel collection keys 
Php :: how to cheeck php 
Php :: do while php 
Php :: laravel multiple orderby 
Php :: search function using php for database entries 
Php :: check if string starts with php 
Php :: php array filter 
Php :: laravel duplicate row 
Php :: Laravel Syntax error or access violation: 1071 Specified key was too long 
Php :: session laravel 
Php :: livewire inline component 
Php :: laravel unique column except self 
Php :: ent_quotes in php 
Php :: php array has key 
Php :: PDOException::("could not find driver") windows 
Php :: paystack gateway integration laravel 
Php :: how to sum in laravel 
Php :: get post data in laravel 
Php :: eloquent update row response 
Php :: php session name 
Php :: php alert yes no 
Php :: laravel eloquent mass update 
Php :: php generating number 
Php :: how to take last entry in database in laravel Method Two 
Php :: laravel server sent events 
Php :: php group multidimensional array by value 
Php :: laravel migration make auto increment 
Php :: php artisan test 
Php :: date diff in laravel 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =