if i had a website create in php. running on a university server. from this website i log in and end up at a file profile.php and i have session data.
Separately i have a game created using node.js. this i currently run on my computer on a localhost. i wish to link the two at the moment on my computer.
so if i use:
php -S localhost:4000
assume my website is running here and i log in and end up at profile.php how would i relocate to the game which is a multiplayer game running on localhost:8080
i tried:
<?php
header("location: http://localhost:8080");
?>
however i get an error saying Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Student\Documents\game\profile.php:6)