In the cloudflare firewall, you can get the parameters of the visitor through special shortcodes. For example, this shortcode is used to obtain the visitor’s IP address.
$_SERVER[“HTTP_CF_CONNECTING_IP”]
I need to similarly receive data from the URL of the visitor’s page that he requested. How can this be done?
If there is no such opportunity through the shortcode, then can it be somehow implemented through the API or in another way? Please help
This isn’t related to Cloudflare, it seems to be more of a general programming question of which Stackoverflow is the best place to answer those.
Either way, you can use $_SERVER['REQUEST_URI] to get the path (e.g. /index.php). To get the full URL you’d combine that with $_SERVER['HTTP_HOST'] - per this SO answer: Get the full URL in PHP - Stack Overflow
Note the security implications though as they fetch user provided data.