http://www.yoursite.ru/cgi-bin/amstat/htreport?date=DATE&what=WHAT
Web-��������� ��������� ������������� ������� ���������� �������� ������ � ���������� � ��������� ����� ������� ������, ���������� � ���� ���������� � ������������� ������ � ������� ���������� WWW.
��� �������� ����� ������ ���������������, ��� �� ��� ������ ������������� WWW ������ � ������ ��������� ����������� ������� � �������� ������� �� ������/������� (����� ���������� � ������ �� ��� ���� ���� �� http://www.apache.org/ � �� http://www.w3.org/). �� ��������, ��� ��� ���������� ������ ������ htreprt ������ ���� ������������� ����� ������������, �� ����� �������� ���������� ������ ����������. ��� �����������, ��������, ������ ����������:
bash# chown 0.0 htreport bash# chmod 6511 htreport bash# ls -l htreport 520 -r-sr-sr-x 1 root wheel 522700 Sep 10 18:58 htreport* |
������ htreport �� ����� ������� �������� ����������� � ����������
��� ������������ �� ���������� ��������� `REMOTE_USER'
, ��� �������,
��� ������ ���������� ��������� `AUTH_TYPE'
. ���� � ��� ����
����������� �� ������������������ ����� ��������� -
�������� ������.
����� ������ ��������� ������ ������� - ���������� ���������
`REQUEST_METHOD'
, �� �������� ������ ���� `GET'
; �������, ������
�������� ������ �������� � ���������� �� ���������� ���������
`QUERY_STRING'
. ��������� ������� �� ����� � ��������,
����������� ������ ��������� (��� ��������). ���� �������� �� �������
���������� �������� `&' (���������). ����� ������ ������ �������
������������� ������������ CGI (Common Gateway Interface), ��� ���������
��������� ������ htreport ��������������� �� WEB ������� ���
CGI-������. ��� ���� � ���������� ��������� `QUERY_STRING'
������� ���
��������� ���� ����� ����� `?' � URL. �������:
http://www.your.site/cgi-bin/amstat/htreport?what=account http://www.your.site/cgi-bin/amstat/htreport?what=stat&date=-.1 |
���� ���������� ��������� `QUERY_STRING'
����� (� URL �� ���� ������
����������), �� ��������������, ��� ��� ����� `what=total'
. �
��������� ������ ������ ������������ ������ ��� ���������:
��������� �������� ������� ���� � ���������. ������ ��� ������ ���������� �� ������� ������. ���� �������� � ����������� �������.
������ ��� ��������, ������� ���������� �������. � ��������� ������ �������� - ��� �������� ����, ���������� ��������� ������� ����������� ������� ����� �������� ������������. ������������ �������� �������� � �������� ���� �������� ���������������� ������.
���������������� ���� `htreport.cf'
������ ���� ��������� � ��������
�������� �������. �� ������� �� ��������� �����; ������ ������ � ������,
������������ � ������� `#' ������������. ��������� ������ ������ ��������
�� ���� ����� - �������� ��������, ��� ��� ����� ������ � ���������
what � �������� �����, � ������� �������� ��� �������� ����� �����
���������� �������.
��������� ����� �������� ��������������� � ����������� ������ �������������� � ���������������� �����:
��������� ���� ��������� ������������ �� ����������.
���������, ���� ����������� ��� �������� �� �������.
��������� ���� ��� ������������ �� ������. ������ ����� ������ ��������������� �� ������ � ������������ Web-������� - ������ ����� ��� ������������ �� ���� ��������� �, ��������������, �������� � ������ htreport.
��������� ���� �� ������ ������� ���������� ��� ������ ������ htreport. ������ �������� ������� ������ - �������� �������� ����������, �������� ����� � �.�.
������:
# ���� ��������� �� �������� �������� "����������", � ��������� �� ��, # ��� ����� ����� ������ ������������� � �������� forms/ ��������� �������� # �������. # # ����������� ������ ��������������! # baduser =ht/baduser.fm nouser =ht/nouser.fm # total =ht/total.fm account =ht/account.fm bill =ht/bill.fm bill-s =ht/bill-s.fm uinfo =ht/uinfo.fm # # � ��� ����� ���������� �������, ������� ������ ���� ������ ������ ����� # ��������� :) # default =ht/default.fm |
����� ����, �������� ������� ������ ������������ � �����, ������������ � ��������.