Get Cloudflare Ray ID

Hi.

How i can get Cloudflare Ray ID in php?

Are you trying to get the Ray ID for a user connecting to your PHP app?

This is sent in a CF-Ray header, so you should be able to access it via $_SERVER['HTTP_CF_RAY'] if I remember correctly. I’d recommend consulting PHP documentation for how to read headers otherwise.

1 Like

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