Search
 
SCRIPT & CODE EXAMPLE
 

PHP

sending data from one website to another in php

$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

php send data from one page to another

session_start();
Comment

PREVIOUS NEXT
Code Example
Php :: curl in php 
Php :: get absolute path php file 
Php :: php sort by associative array value 
Php :: laravel 8: bootstrap 
Php :: types of controller in laravel 
Php :: php add property to object 
Php :: php utc time 
Php :: fnmatch php ignore case 
Php :: php color generator 
Php :: php array check value exists 
Php :: php override trait method and call it 
Php :: create seeder in laravel 
Php :: or where laravel 
Php :: password validation rules laravel 
Php :: laravel routes resource 
Php :: php How do you remove an array element in a foreach loop? 
Php :: wp_create_user 
Php :: php float value 
Php :: symfony see all make commands 
Php :: how to get last id in database 
Php :: laravel log path 
Php :: php get src content from image tag 
Php :: get woocommerce product category link by id 
Php :: eloquent limit 
Php :: use multiple pagination in same page laravel 
Php :: next year php string 
Php :: Command for single migration in larvel 
Php :: Convert String containing commas to array 
Php :: php compute price less discount 
Php :: install php extensions for magento 2 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =