{"id":21538200,"url":"https://github.com/randomsymbols/fsubmit","last_synced_at":"2025-04-10T03:17:49.304Z","repository":{"id":41190339,"uuid":"266415865","full_name":"randomsymbols/fsubmit","owner":"randomsymbols","description":"PHP library to submit HTML forms.","archived":false,"fork":false,"pushed_at":"2022-06-29T11:48:07.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T03:17:38.189Z","etag":null,"topics":["curl","html-forms"],"latest_commit_sha":null,"homepage":"https://github.com/randomsymbols/fsubmit","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/randomsymbols.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-23T20:39:39.000Z","updated_at":"2023-07-28T21:02:46.000Z","dependencies_parsed_at":"2022-09-12T08:11:57.217Z","dependency_job_id":null,"html_url":"https://github.com/randomsymbols/fsubmit","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomsymbols%2Ffsubmit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomsymbols%2Ffsubmit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomsymbols%2Ffsubmit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomsymbols%2Ffsubmit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randomsymbols","download_url":"https://codeload.github.com/randomsymbols/fsubmit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148247,"owners_count":21055548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curl","html-forms"],"created_at":"2024-11-24T04:11:04.220Z","updated_at":"2025-04-10T03:17:49.277Z","avatar_url":"https://github.com/randomsymbols.png","language":"PHP","readme":"# fsubmit\n\nHave you ever tried to submit an HTML form with cUrl?\nYou have to clearly state all the fields you submit and what values they have. \n\nIn real life, we most often only want to fill in one or two fields without even thinking about what other fields are.\n\nIf you hardcode the other fields' values into your cUrl request, what if the form changes over time?\nYou code will be broken. \n\nTo keep you code adoptable to the changes of the form, you will have to download the form as is first, \nparse its fields and values, change/add values to the right fields and submit it with cUrl. \n\nIt causes a lot of questions if you do not know how HTML forms work. \nFor example, if there is a select tag with several options, \nwhich one will be submitted as the value for the field if none is selected? What if the option tag has no value attribute?\n\nAn Internet browser does the job for us when we submit a form. \nWe do not have to bother about hidden fields or any other fields at all. The library provides the same functionality for PHP.\n\n## Requirements\n\nPHP 7.4 and later.\n\n## Composer\n\nYou can install the library via [Composer](http://getcomposer.org/). Run the following command:\n\n```bash\ncomposer require randomsymbols/fsubmit\n```\n\nTo use the library, use composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):\n\n```php\nrequire_once('vendor/autoload.php');\n```\n\n## Dependencies\n\nThe library requires the following extensions in order to work properly:\n\n-   [`curl`](https://secure.php.net/manual/en/book.curl.php)\n-   [`openssl`](https://www.php.net/manual/en/openssl.installation.php)\n-   [`PHP Simple HTML DOM Parser`](https://github.com/voku/simple_html_dom)\n\nIf you use Composer, these dependencies should be handled automatically. If you install manually, make sure these extensions are available.\n\n## Getting Started\n\n```php\nuse Fsubmit\\Form;\n\n$form = Form::fromUrl('https://www.google.com');\n$form-\u003esetParams(['q' =\u003e 'John 3:16']);\n$answer = $form-\u003esubmit();\necho $answer['content'];\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomsymbols%2Ffsubmit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandomsymbols%2Ffsubmit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomsymbols%2Ffsubmit/lists"}