Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
HTTP vs HTTPS
HTTP
stands for Hypertext Transfer Protocol. The standard (default) port for
HTTP
connection is
80
, but other port can also be used HTTP does not have any
security
...
HTTPS
stands for Hypertext Transfer Protocol Secure. HTTPS has a secure transfer. The standard port in
HTTPS
to transfer the information is
443
HTTPS protocol uses HTTP on connection encrypted by SSL or TLS (therefore it's secure)
by Valeri Tandilashvili
4 years ago
0
HTTP
1
general HTTP headers
Request URL
- reqeusted URL by a user
Request Method
- HTTP method that is used for the request
Status Code
- status code shows how successful the request was
Remote Address
- server address that the website is hosted to
by Valeri Tandilashvili
4 years ago
0
HTTP
1
Media types that are acceptable for the response
Accept: text/html, application/xml,...
List of acceptable encodings (HTTP compression types)
Accept-Encoding: gzip, deflate, br
An HTTP cookie previously sent by the server with Set-Cookie (below)
Cookie: _ga=GA1.2.588481944.1592916481; _fbp=fb.1.1592916481604.1420873611; ...
The user agent string of the user agent (browser identifier string)
User-Agent: Mozilla/5.0 (Linux...
Authentication credentials for HTTP authentication
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
The email address of the user making the request
From: user@example.com
The length of the request body in octets (8-bit bytes).
Content-Length: 348
... Note:
browsers that do not support compliant compression method will download uncompressed data
by Valeri Tandilashvili
4 years ago
0
HTTP
1
Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds (example: Cache-Control: max-age=3600``)
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
The type of encoding used on the data
Content-Encoding: gzip
The MIME type of this content
Content-Type: text/html; charset=UTF-8
A name for the server
Server: nginx
The date and time that the message was sent
Date: Fri, 30 Oct 2020 14:42:53 GMT
Gives the date/time after which the response is considered stale
Expires: Thu, 01 Dec 1994 16:00:00 GMT
by Valeri Tandilashvili
4 years ago
0
HTTP
1
short_open_tag
If we want to use short open tag
<?
instead of
<?php
then we must configure
short_open_tag
setting in
php.ini
to
on
<?
echo '"short_open_tag" should be ON if we want to use short tags ' ;
?>
by Valeri Tandilashvili
4 years ago
0
PHP
1
$argv
contains filename and parameters, when the
php script
is called through command line (cmd).
test_args.php
file content:
<?php

echo 'Filename:'.$argv[0].";  ";
echo 'First parameter:'.$argv[1].";  ";
echo 'Second parameter:'.$argv[2].";  ";
If we run the command:
php test_args.php first-param second-param
in
cmd
the script above will output the following:
Filename:test_args.php;  First parameter:first-param;  Second parameter:second-param;
by Valeri Tandilashvili
4 years ago
0
PHP
1
getmypid
- Gets PHP's process ID
echo 'Current process ID:' . getmypid();
The output will be:
Current process ID:4868
by Valeri Tandilashvili
4 years ago
0
PHP
functions
1
Registers a function that will be executed right before the PHP process stops execution
register_shutdown_function('myexit');

function myexit()
{
	echo "</schedule>";
}
by Valeri Tandilashvili
4 years ago
0
PHP
functions
PHP official doc
1
The built-in function
http_response_code
Sets HTTP response status code
404
http_response_code(404);
by Valeri Tandilashvili
4 years ago
0
PHP
functions
1
$Datetime_object = DateTime::createFromFormat('Y-m-d', "2020-12-23");
by Valeri Tandilashvili
4 years ago
0
PHP
datetime
1
Results: 1580