Use PHP script to "click" on the link

I am solving a question that I cannot understand. I need to log in and click again (thousands of times) on a specific link to create some kind of load. I know that I should use HTTP / PHP for this, but don’t know how to solve the login? My next idea was to use a packet sniffer and resubmit requests ... but will it work when I close the browser? Thanks

+3
source share
2 answers

If you want to do this with a PHP script, you can use cURL to simulate an HTTP request. However, it’s easier to use a reference tool, such as abor siege, to load specific URLs.

C ab:

ab -n 1000 -c 10 http://www.example.com/login.php

From the Siege website:

Siege is a regression test and benchmark utility. It can test a single URL with user-defined users, or it can read many URLs in memory and underline them at the same time. The program reports the total number of recorded videos, transferred bytes, response time, concurrency and return status. Siege supports HTTP / 1.0 and 1.1, GET and POST directives, cookies, transaction logging and basic authentication. Its features are customizable for each user.

.

+4

Selenium. , script .

+1

Source: https://habr.com/ru/post/1731196/


All Articles