The PHP function curl_getinfo() provides detailed information about the executed cURL request. This article explains the meaning of each field.
Example usage
Call the function over the result of the context from curl_init():
$ch = curl_init();
curl…
In HTTP communication, so-called state codes' are transmitted, which is information about how the transfer was made. I'm sure you know that a 200code means success and a404` code means a non-existent page.
Status codes are divided into several…
An API (Application programming interface) is an abstract programming interface for simplifying communication between multiple types of software.
If you're figuring out how to implement an API for your web site, I recommend the Structured REST API…
In addition to the regular variables, we also have so-called superglobal variables in PHP, which carry information about the currently called page and the data we are passing.
Typically, we have a form on a page that the user fills in and we want to…
Often we need to store more information in cookies, but the maximum limit for cookies is 4 kB, which is not much. Sessions solves this problem by storing the data on the web server, and only stores a short identifier in the client's browser to tell…
While developing ajax Vue.js applications, after years I finally found out how to use ajax in PHP and how to receive data by POST method.
The superglobal variable $_POST is only available for forms
In PHP, the superglobal variable $_POST is commonly…
Warning: This article was written many years ago and some information may be outdated or incorrect. Please bear this in mind when reading.
Cookies are small pieces of textual information stored in a website visitor's browser. They are always…
Sending data by POST is quite different from GET, it is safer, the text can be longer and its value cannot be determined except by a form or a header (which you will not get by mistake).
Source
Source is not that different from the GET method. It's…
You know, you have a page open, you follow the URL and you see a question mark with some parameters. An inexperienced programmer would think that these are separate files, but lo and behold. Try to create a file that has a question mark in its name …