{"id":871,"date":"2022-04-25T10:18:43","date_gmt":"2022-04-25T09:18:43","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=871"},"modified":"2022-04-25T10:18:46","modified_gmt":"2022-04-25T09:18:46","slug":"how-to-create-rest-api-using-vanilla-php","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/","title":{"rendered":"How to Create REST API Using Vanilla PHP"},"content":{"rendered":"\n<p>API stands for Application Programming Interface. <\/p>\n\n\n\n<p>It&#8217;s an intermediary that allows two applications to talk to each other by both delivering requests to the provider and getting back a response.<\/p>\n\n\n\n<p>REST stands for Representational State Transfer<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-see-how-to-work-with-fetch-api\"><a href=\"https:\/\/codeflarelimited.com\/blog\/working-with-fetch-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">See How to work with Fetch API<\/a><\/h3>\n\n\n\n<p>In this tutorial, we are going to demonstrate how to create a REST API in our software application using PHP.<\/p>\n\n\n\n<p>We are going to create an API with a GET Request. We want to retrieve registration details from our database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-setup-the-database\">1. Setup the Database<\/h2>\n\n\n\n<p>First, we need to setup our table. We will create our table as follows<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">CREATE TABLE `your_database_name`.`test_registration` ( `id` INT NOT NULL AUTO_INCREMENT , `username` VARCHAR(255) NOT NULL , `email` VARCHAR(255) NOT NULL , `password` TEXT NOT NULL , `date_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = MyISAM;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"337\" src=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/how-to-create-api-software-development.png\" alt=\"how to create api with PHP\" class=\"wp-image-875\" srcset=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/how-to-create-api-software-development.png 912w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/how-to-create-api-software-development-300x111.png 300w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/how-to-create-api-software-development-768x284.png 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><figcaption>How to create API with PHP<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-add-mock-data\">2. Add Mock Data<\/h2>\n\n\n\n<p>Next, we are going add sample data to our table so that we can have something to retrieve.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">INSERT INTO `test_registration` (`id`, `username`, `email`, `password`, `date_time`) VALUES (NULL, 'Luke', 'lawsonluke9@gmail.com', '123333', current_timestamp());<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"172\" src=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/software-development-training-in-abuja-1.png\" alt=\"\" class=\"wp-image-876\" srcset=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/software-development-training-in-abuja-1.png 703w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/software-development-training-in-abuja-1-300x73.png 300w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><figcaption>Create API with PHP<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-create-the-api\">3. Create the API<\/h2>\n\n\n\n<p>Next, we are going to write the API that will fetch our records from the database.<\/p>\n\n\n\n<p>What we want to do first is to write a database connection script and we&#8217;re using PDO. <a href=\"https:\/\/codeflarelimited.com\/blog\/create-a-php-login-and-register-form-using-pdo-and-password-encryption-technique\/\" target=\"_blank\" rel=\"noreferrer noopener\">We&#8217;ve covered much about PDO here<\/a>.<\/p>\n\n\n\n<p>We&#8217;re fetching the result and we&#8217;re storing it in an array and encoding with <a href=\"https:\/\/www.json.org\/json-en.html\" target=\"_blank\" rel=\"noreferrer noopener\">JSON<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\"> &lt;?php\n\nheader(\"Access-Control-Allow-Origin: *\");\nheader(\"Access-Control-Allow-Headers: access\");\nheader(\"Access-Control-Allow-Methods: GET\");\nheader(\"Content-Type: application\/json; charset=UTF-8\");\n\nclass Constants\n{\n    static $DB_SERVER=\"localhost\";\n    static $DB_NAME=\"your_database_name\";\n    static $USERNAME=\"your_database_username\";\n    static $PASSWORD=\"your_database_password\";\n\n    static $SQL_SELECT_ALL=\"SELECT * FROM test_registration ORDER BY RAND()\";\n\n}\n\nclass Register\n{\n\n    public function connect()\n    {\n        $con=new mysqli(Constants::$DB_SERVER,Constants::$USERNAME,Constants::$PASSWORD,Constants::$DB_NAME);\n        if($con->connect_error)\n        {\n            return null;\n        }else\n        {\n            return $con;\n        }\n    }\n    public function select()\n    {\n        $con=$this->connect();\n        if($con != null)\n        {\n            $result=$con->query(Constants::$SQL_SELECT_ALL);\n            if($result->num_rows>0)\n            {\n                $reg=array();\n                while($row=$result->fetch_array())\n                {\n                    array_push($reg, array(\"id\"=>$row['id'],\"email\"=>$row['email'],\"username\"=>$row['username']));\n                }\n                print(json_encode(array_reverse($reg)));\n            }else\n            {\n                print(json_encode(array(\"No records found\")));\n            }\n            $con->close();\n\n        }else{\n            print(json_encode(array(\"PHP EXCEPTION : CAN'T CONNECT TO MYSQL. NULL CONNECTION.\")));\n        }\n    }\n}\n$reg=new Register();\n$reg->select();\n\n?><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-result\">Result:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"42\" src=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-2022-04-25-at-10.12.48.png\" alt=\"\" class=\"wp-image-877\" srcset=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-2022-04-25-at-10.12.48.png 505w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-2022-04-25-at-10.12.48-300x25.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>This is how we create API using vanilla PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>API stands for Application Programming Interface. It&#8217;s an intermediary that allows two applications to talk to each other<\/p>\n","protected":false},"author":1,"featured_media":878,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[87,98],"tags":[],"class_list":["post-871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-softare-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create REST API Using Vanilla PHP<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create REST API Using Vanilla PHP\" \/>\n<meta property=\"og:description\" content=\"API stands for Application Programming Interface. It&#8217;s an intermediary that allows two applications to talk to each other\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-25T09:18:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-25T09:18:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"How to Create REST API Using Vanilla PHP\",\"datePublished\":\"2022-04-25T09:18:43+00:00\",\"dateModified\":\"2022-04-25T09:18:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/\"},\"wordCount\":207,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/rest-api-php-mysql.png\",\"articleSection\":[\"php\",\"softare development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/\",\"name\":\"How to Create REST API Using Vanilla PHP\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/rest-api-php-mysql.png\",\"datePublished\":\"2022-04-25T09:18:43+00:00\",\"dateModified\":\"2022-04-25T09:18:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/rest-api-php-mysql.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/rest-api-php-mysql.png\",\"width\":500,\"height\":300,\"caption\":\"create REST API using vanilla php\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-create-rest-api-using-vanilla-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"softare development\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/softare-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Create REST API Using Vanilla PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create REST API Using Vanilla 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:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/","og_locale":"en_US","og_type":"article","og_title":"How to Create REST API Using Vanilla PHP","og_description":"API stands for Application Programming Interface. It&#8217;s an intermediary that allows two applications to talk to each other","og_url":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2022-04-25T09:18:43+00:00","article_modified_time":"2022-04-25T09:18:46+00:00","og_image":[{"width":500,"height":300,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","type":"image\/png"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"How to Create REST API Using Vanilla PHP","datePublished":"2022-04-25T09:18:43+00:00","dateModified":"2022-04-25T09:18:46+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/"},"wordCount":207,"commentCount":1,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","articleSection":["php","softare development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/","url":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/","name":"How to Create REST API Using Vanilla PHP","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","datePublished":"2022-04-25T09:18:43+00:00","dateModified":"2022-04-25T09:18:46+00:00","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","width":500,"height":300,"caption":"create REST API using vanilla php"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-create-rest-api-using-vanilla-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"softare development","item":"https:\/\/codeflarelimited.com\/blog\/softare-development\/"},{"@type":"ListItem","position":3,"name":"How to Create REST API Using Vanilla PHP"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/04\/rest-api-php-mysql.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=871"}],"version-history":[{"count":2,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/871\/revisions"}],"predecessor-version":[{"id":879,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/871\/revisions\/879"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/878"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}