Snippet Call doesnt work with include

Hi everyone! I want to include the header of our white label partner in our site with a snippet, but it doesnt work properly.

Snippet call:
[[header-snippet]]

Snippet:

<?php include (url-of-whitelablepartner/header-basic?includeVendorChunks=true);?>

The snippet does include the header - but ignores the query string (everything after the ?)
Does anyone know what i am doing wrong?
Is ist possible to call the snippet and include the query string within the snippet-call? Or any other ideas?
thx for help.

include doesn’t work that way. It doesn’t read and execute files by its url.
Read about that here:

PHP - include() file not working when variables are put in url? - Stack Overflow

what exactly are you trying to solve?

the header i want to include is not a file, its part of mini-website from our white-label partner

including does work, however the query-string is ignored, which is important for maintaining some functions of the header.
thats my only problem - i am not able to implement the query string in the url which should be in included.

including the php-file on a testpage with the whole url (same like the script in my first post) is possible, its just not possible to call it from the snippet [[header-snippet]] - it always ignores the query string.

inkluding the php-script in a html-page works fine:

<?php include('url-of-whitelablepartner/header-basic?includeVendorChunks=true'); echo 'Hello World'; ?>

but calling the php-code with a modx snippet [[header-snippet]] ignores the query-string
?includeVendorChunks=true

did you try to set

$_GET['includeVendorChunks']

before the include?

yes, i tried this as well

include - including a remote file in PHP - Stack Overflow

is allow_url_include enabled?

Or is it maybe possible to CURL that URL?

For security reasons allow_url_include is disabled

Then it can’t work with include.
You can try CURL or file_get_contents.

sorry, it is enabled, my wrong.
cause including the header works - the tricky thing is just the issue with the missing query-string …