Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to send 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 :: globals in php 
Php :: php back to original site 
Php :: brew php version 
Php :: how to check php version codeigniter 3 
Php :: store multiple session in laravel 
Php :: push key and value in laravel 
Php :: livewire not working 
Php :: How to use my constants in Larvel 
Php :: php auto redirect 
Php :: PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes") 
Php :: set session in laravel 
Php :: Fatal error: Allowed memory size of 1610612736 bytes exhausted but already allocated 1.75G 
Php :: aapanel ubuntu 20.04 
Php :: laravel show debug query sql 
Php :: query php 
Php :: laravel print to log 
Php :: php var in string 
Php :: cannot use font awesome in php mvc 
Php :: window.location javascript php 
Php :: composer require no cache 
Php :: php new stdClass object 
Php :: Automatically Delete Woocommerce Images After Deleting a Product 
Php :: convert text file to json php 
Php :: destrroy a session php 
Php :: carbon previous day 
Php :: migration rename column laravel 
Php :: php force array keys trim 
Php :: how to create migration in laravel 
Php :: php take picture with mobile camera 
Php :: laravel validation digits 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =