Show a php website in fiveM

Hi everyone,
I’m trying to load my PHP website inside a FiveM resource using an iframe.
However, the NUI always shows a black screen and I can’t figure out why.

My setup: The webserver runs on Plesk, the domain is from Strato, and the nameservers are managed through Cloudflare — not sure if that’s relevant.

Things I’ve tried so far:

  • Added all required iframe headers (removed X-Frame-Options, set CSP frame-ancestors *)
  • Set SameSite=None; Secure on all cookies
  • Disabled Brotli compression in Cloudflare
  • Tested with other external websites → they load correctly in the NUI
  • Tested my own site via PowerShell/cURL → returns correct headers
  • Direct access to the PHP pages works in the browser, only FiveM shows a black screen

Has anyone dealt with this issue before or knows what else I could try? Any help would be appreciated.

Make sure you are using the Beta or Canary versions of FiveM (change from main menu settings), then you can access the NUI Tool via the F8 menu - using this you’ll get a full Chrome Dev Tools window you can use to diagnose the problem.

1 Like

Thank you. Had to change something in the .htaccess to get it workin.

1 Like

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