<?php
$cooki = $_COOKIE["flarum_session"];
$crl = curl_init();
curl_setopt($crl, CURLOPT_URL, "https://FORUMURL/api/getuser");
curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crl, CURLOPT_HTTPHEADER, array(
"Cookie: flarum_session=$cooki"
));
$out = curl_exec($crl);
echo "output: $out";
curl_close($crl);
Okay managed to figure it out, thanks for the help really appreciate it.