Hi Filip - You need to translate your custom WP_Query into a raw mySQL query string and assign it to
$query in the above snippet. I'm not good enough with mySQL to do that for you, but I know you can see the raw query used by WP_Query by hooking the 'posts_request' filter. You can't do this dynamically because WP is not initiated in the website. You can use the information to hardcode into the above snippet though.
The other issue with not having WP initiated is you cannot use the WP "loop" and the associated template tags to display the results of your query. You'll need to work out a reasonable display using only the raw post object data and standard PHP functions. Any WP functions will not work.