Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-16-2018, 09:04 AM   #1
ajaxdns
Registered User
 
Join Date: Apr 2018
Posts: 1,360
How to Pass JSON Data in a URL using CURL in PHP ?

Code to post JSON Data in a URL using CURL in PHP


$url='https://www.devquora.com/get_details';
$jsonData='{"name":"phpScots",
"email":"phpscots@onlineinterviewquestions.com "
,'age':36
}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_close($ch);
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ajaxdns is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Pass JSON Data in a URL using CURL in PHP ? ajaxdns PHP / mySQL 0 08-11-2018 08:57 AM
List data types in PHP ? ajaxdns PHP / mySQL 0 08-11-2018 08:55 AM
Importance of Php Development for Web Development tech.biztech Programming General 52 08-01-2018 01:18 PM
How many data types are there in PHP? tmpooja PHP / mySQL 0 04-22-2018 10:41 AM
Exporting data of a table in mysql using php fro foxpro ncjbhd PHP / mySQL 0 09-06-2011 12:15 AM


All times are GMT -7. The time now is 05:38 AM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.