Receive URL the visitor's page. How?

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

I’m not sure I understand. What you provided is the way in PHP you get the CF-Connecting-IP header (which is a way to get the users IP).

Are you trying to get other headers? What exactly are you trying to achieve?

I need to receive URL of visitor’s page. Example : https://abc.ru/page.html
IP address of visitor it is not a URL page he requested

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.

Brotherly heart. You helped me a lot. Many thanks and a low bow from God’s forgotten Russia

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.