Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Sending Data over another website via 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

PREVIOUS NEXT
Code Example
Php :: sending data from one website to another in php 
Php :: delete directory from laravel storage 
Php :: access json object in php 
Php :: php checking if array is multidimensional or not 
Php :: take and skip in laravel 
Php :: where is the php ini file located on server 
Php :: php oop 
Php :: angular post phph 
Php :: php remove and  
Php :: php exec without waiting 
Php :: woocommerce show data to cart page 
Php :: Yii::app()-request-get yii1 
Php :: php check session status 
Php :: check number is positive or negative in php 
Php :: get 2 days before date in php 
Php :: base64 enocode php 
Php :: range in php 
Php :: laravel eloquent select one column in array 
Php :: redrectnh to https n laravel 
Php :: php save array in mysql database 
Php :: Ways to write comments in PHP 
Php :: php boolean to string 
Php :: search string inside array of objects php 
Php :: php switch case default 
Php :: codeigniter 4 limit query 
Php :: carbon get day name from date 
Php :: store fetched data into array php 
Php :: db name laravel 
Php :: woocommerce cart length button shortcode 
Php :: php array loop 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =