Download the PHP package randomsymbols/fsubmit without Composer
On this page you can find all versions of the php package randomsymbols/fsubmit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download randomsymbols/fsubmit
More information about randomsymbols/fsubmit
Files in randomsymbols/fsubmit
Package fsubmit
Short Description Submit HTML forms from PHP
License LGPL-3.0-or-later
Homepage https://github.com/randomsymbols/fsubmit
Informations about the package fsubmit
fsubmit
Have you ever tried to submit an HTML form with cUrl? You have to clearly state all the fields you submit and what values they have.
In real life, we most often only want to fill in one or two fields without even thinking about what other fields are.
If you hardcode the other fields' values into your cUrl request, what if the form changes over time? You code will be broken.
To keep you code adoptable to the changes of the form, you will have to download the form as is first, parse its fields and values, change/add values to the right fields and submit it with cUrl.
It causes a lot of questions if you do not know how HTML forms work. For example, if there is a select tag with several options, which one will be submitted as the value for the field if none is selected? What if the option tag has no value attribute?
An Internet browser does the job for us when we submit a form. We do not have to bother about hidden fields or any other fields at all. The library provides the same functionality for PHP.
Requirements
PHP 7.4 and later.
Composer
You can install the library via Composer. Run the following command:
To use the library, use composer's autoload:
Dependencies
The library requires the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, make sure these extensions are available.