{"id":2696,"date":"2017-08-10T17:30:21","date_gmt":"2017-08-10T17:30:21","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=2696"},"modified":"2023-04-15T05:16:00","modified_gmt":"2023-04-15T05:16:00","slug":"post-receive-json-data-using-php-curl","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/","title":{"rendered":"How to POST and Receive JSON Data using PHP cURL"},"content":{"rendered":"<p><b>JSON<\/b> is the most popular data format for exchanging data between a browser and a server. The JSON data format is mostly used in web services to interchange data through API. When you working with web services and APIs, sending <b>JSON data via POST<\/b> request is the most required functionality. <b>PHP cURL<\/b> makes it easy to POST JSON data to URL. In this tutorial, we will show you how to <b>POST JSON data<\/b> using PHP cURL and <b>get JSON data<\/b> in PHP.<\/p>\n<h2>Send JSON data via POST with PHP cURL<\/h2>\n<p>The following example makes an HTTP POST request and send the JSON data to URL with <b>cURL in PHP<\/b>.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Specify the URL (<code>$url<\/code>) where the JSON data to be sent.<\/li>\n<li>Initiate new cURL resource using <b>curl_init()<\/b>.<\/li>\n<li>Setup data in PHP array and encode into a JSON string using <b>json_encode()<\/b>.<\/li>\n<li>Attach JSON data to the POST fields using the CURLOPT_POSTFIELDS option.<\/li>\n<li>Set the Content-Type of request to <code>application\/json<\/code> using the CURLOPT_HTTPHEADER option.<\/li>\n<li>Return the response as a string instead of outputting it using the CURLOPT_RETURNTRANSFER option.<\/li>\n<li>Finally, the <b>curl_exec()<\/b> function is used to execute the POST request.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/ API&nbsp;URL<br><\/span><span style=\"color: #0000BB\">$url&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'https:\/\/www.example.com\/api'<\/span><span style=\"color: #007700\">;<br><br><\/span><span style=\"color: #FF8000\">\/\/ Create&nbsp;a&nbsp;new&nbsp;cURL&nbsp;resource<br><\/span><span style=\"color: #0000BB\">$ch&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">curl_init<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$url<\/span><span style=\"color: #007700\">);<br><br><\/span><span style=\"color: #FF8000\">\/\/ Setup&nbsp;request&nbsp;to&nbsp;send&nbsp;json&nbsp;via&nbsp;POST<br><\/span><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array(<br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'username'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #DD0000\">'codexworld'<\/span><span style=\"color: #007700\">,<br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'password'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #DD0000\">'123456'<br><\/span><span style=\"color: #007700\">);<br><\/span><span style=\"color: #0000BB\">$payload&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">json_encode<\/span><span style=\"color: #007700\">(array(<\/span><span style=\"color: #DD0000\">\"user\"&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">));<br><br><\/span><span style=\"color: #FF8000\">\/\/ Attach&nbsp;encoded&nbsp;JSON&nbsp;string&nbsp;to&nbsp;the&nbsp;POST&nbsp;fields<br><\/span><span style=\"color: #0000BB\">curl_setopt<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$ch<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">CURLOPT_POSTFIELDS<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$payload<\/span><span style=\"color: #007700\">);<br><br><\/span><span style=\"color: #FF8000\">\/\/ Set&nbsp;the&nbsp;content&nbsp;type&nbsp;to&nbsp;application\/json<br><\/span><span style=\"color: #0000BB\">curl_setopt<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$ch<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">CURLOPT_HTTPHEADER<\/span><span style=\"color: #007700\">,&nbsp;array(<\/span><span style=\"color: #DD0000\">'Content-Type:application\/json'<\/span><span style=\"color: #007700\">));<br><br><\/span><span style=\"color: #FF8000\">\/\/ Return&nbsp;response&nbsp;instead&nbsp;of&nbsp;outputting<br><\/span><span style=\"color: #0000BB\">curl_setopt<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$ch<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">CURLOPT_RETURNTRANSFER<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">true<\/span><span style=\"color: #007700\">);<br><br><\/span><span style=\"color: #FF8000\">\/\/ Execute&nbsp;the&nbsp;POST&nbsp;request<br><\/span><span style=\"color: #0000BB\">$result&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">curl_exec<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$ch<\/span><span style=\"color: #007700\">);<br><br><\/span><span style=\"color: #FF8000\">\/\/ Close&nbsp;cURL&nbsp;resource<br><\/span><span style=\"color: #0000BB\">curl_close<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$ch<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<h2>Receive JSON POST Data using PHP<\/h2>\n<p>The following example shows how you can get or fetch the JSON POST data using PHP.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Use <b>json_decode()<\/b> function to decoded JSON data in PHP.<\/li>\n<li>The <b>file_get_contents()<\/b> function is used to receive data in a more readable format.<\/li>\n<\/ul>\n<pre><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">json_decode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">file_get_contents<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'php:\/\/input'<\/span><span style=\"color: #007700\">),&nbsp;<\/span><span style=\"color: #0000BB\">true<\/span><span style=\"color: #007700\">);<\/span>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>JSON is the most popular data format for exchanging data between a browser and a server. The JSON data format is mostly used in web services to interchange data through API. When you working with <\/p>\n","protected":false},"author":1,"featured_media":2697,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[250,294,14],"class_list":["post-2696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-api","tag-json","tag-php","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to POST and Receive JSON Data using PHP cURL - CodexWorld<\/title>\n<meta name=\"description\" content=\"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to POST and Receive JSON Data using PHP cURL - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-10T17:30:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-15T05:16:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"How to POST and Receive JSON Data using PHP cURL\",\"datePublished\":\"2017-08-10T17:30:21+00:00\",\"dateModified\":\"2023-04-15T05:16:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/\"},\"wordCount\":247,\"commentCount\":15,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/post-get-receive-json-data-php-curl-codexworld.png\",\"keywords\":[\"API\",\"JSON\",\"PHP\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/\",\"name\":\"How to POST and Receive JSON Data using PHP cURL - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/post-get-receive-json-data-php-curl-codexworld.png\",\"datePublished\":\"2017-08-10T17:30:21+00:00\",\"dateModified\":\"2023-04-15T05:16:00+00:00\",\"description\":\"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/post-get-receive-json-data-php-curl-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/post-get-receive-json-data-php-curl-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"post-get-receive-json-data-php-curl-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/post-receive-json-data-using-php-curl\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to POST and Receive JSON Data using PHP cURL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to POST and Receive JSON Data using PHP cURL - CodexWorld","description":"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/","og_locale":"en_US","og_type":"article","og_title":"How to POST and Receive JSON Data using PHP cURL - CodexWorld","og_description":"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.","og_url":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2017-08-10T17:30:21+00:00","article_modified_time":"2023-04-15T05:16:00+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"How to POST and Receive JSON Data using PHP cURL","datePublished":"2017-08-10T17:30:21+00:00","dateModified":"2023-04-15T05:16:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/"},"wordCount":247,"commentCount":15,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","keywords":["API","JSON","PHP"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/","url":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/","name":"How to POST and Receive JSON Data using PHP cURL - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","datePublished":"2017-08-10T17:30:21+00:00","dateModified":"2023-04-15T05:16:00+00:00","description":"POST JSON Data to URL with PHP cURL - Learn how to send JSON data via POST request using PHP cURL. Example code to send and receive JSON data with cURL in PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","width":1366,"height":768,"caption":"post-get-receive-json-data-php-curl-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/post-receive-json-data-using-php-curl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"How to POST and Receive JSON Data using PHP cURL"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/08\/post-get-receive-json-data-php-curl-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-Hu","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=2696"}],"version-history":[{"count":5,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2696\/revisions"}],"predecessor-version":[{"id":5317,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2696\/revisions\/5317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/2697"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=2696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=2696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=2696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}