Download the PHP package orkhanshukurlu/php-csrf without Composer

On this page you can find all versions of the php package orkhanshukurlu/php-csrf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-csrf

PHP CSRF

Minimum PHP Version Latest Stable Version Total Downloads License

PHP-CSRF sizə veb-saytınızı CSRF hücumlarından qorumaq üçün bir sıra funksiyalar təklif edir. Bu funksiyalardan istifadə edərək yazdığınız vebsaytı həm daha təhlükəsiz etmiş olacaqsınız həm də botlardan və arzuolunmaz insanlardan uzaq tutacaqsınız

Tələblər

Yükləmə

İstifadə

Funksiyaları istifadə edəcəyiniz fayllarda vendor/autoload.php faylını daxil etmək lazımdır

Funksiyalar

csrf_field(string $name = '_token', int $length = 40) - CSRF token inputu generasiya edir

Funksiya html-də form elementinin daxilində istifadə edilməlidir. Beləliklə typehidden, name-i _token, value-si 40 simvoldan ibarət olan input generasiya olunacaq. İstifadəsi aşağıdakı kimidir:

Generasiya olunan input html-də aşağıdakı kimi görünəcək:


csrf_token(int $length = 40) - CSRF token dəyəri generasiya edir

Funksiya 40 simvoldan ibarət token generasiya edir. Əgər yalnız token dəyəri lazımdırsa bu funksiyanı istifadə edə bilərsiniz. İstifadəsi aşağıdakı kimidir:

Generasiya olunan token aşağıdakı kimi görünəcək:


csrf_validate(array $request, string $name = '_token') - CSRF tokenin doğruluğunu yoxlayır

Funksiya form-da göndəriləcək tokenin doğru olub olmadığını yoxlayır. Beləliklə form göndəriləndə token dəyəri düzgündürsə true, düzgün deyilsə false dəyəri geri döndürür. Funksiyaya parametr kimi $_GET, $_POST və ya $_REQUEST dəyişənlərindən biri ötürülməlidir. İstifadəsi aşağıdakı kimidir:

Lisenziya

Laravel MSM MIT lisenziyası altında buraxılıb

Əlaqə

Telegram: Orxan Şükürlü


All versions of php-csrf with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orkhanshukurlu/php-csrf contains the following files

Loading the files please wait ....