I have a PHP redirect page to track clicks on links. This basically does:
- get url from $_GET - connect to database - create row for url, or update with 1 hit if it exists - redirect browser to url using Location: header
I was wondering if it is possible to first send the redirect to the client so that he can continue to work with this task, and then register the click. Would you just switch to work?
You can do it:
$_GET
Location:
flush()
, , ( , - flush() ) , , Location: , , .
, , script . , pcntl_fork(); Apache SAPI.
pcntl_fork()
, , . , , ... ( , mysqld RAM ). http://dev.mysql.com/doc/refman/5.1/en/insert-delayed.html
. PHP , . , :
<?php header('location: /'); sleep(2); ?>
2 .
Source: https://habr.com/ru/post/1705748/More articles:What is the autocomplete option when creating a new database in SQL Server 2008? - sqlHow to write an SQL query that looks up the value in all columns and all tables in my database? - sql-serverWiX - check for previous installation - windowsWhat is the best way to host a small ruby ​​app online? - ruby ​​| fooobar.comWhere does the Intel C ++ compiler store vptr (a pointer to a table of virtual functions) in an object? - c ++Mutex Stored Procedure - c #Decorators and in the classroom - pythonLaTeX: how to use the required default arg argument for optional? - definitionForm in "Actual Size" - javatextRange selection MSIE - javascriptAll Articles