Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

William, grateful for any idea!
Leo.

iIndex.php?data=UserLeonFinishedScene1 

iIndex.php :

<?php
  echo 'I will write UserData to user.log <br />'; 
  $filename = 'user.log';
  $text = "\r\n Date:". date('Y-m-d\=H:i:s') . "Data :" . $_GET["data"];
    //Writing: 
  $file = fopen ($filename, "a");
  fwrite ($file,$text);
  fclose ($file);
  echo "UserData was writed successfull to file [$filename]  !<br/><br/>"; 
?>

Basically what you should do is host your PHP file on your own web server, then have your game make a GET request to

https://[your domain name]/iIndex.php?data=UserLeonFinishedScene1

So when someone plays your game on here, their browser downloads all the actual game stuff from Itch, but those game files then tell it to send some data to your server. If you already have the game working on your own website then you should be able to basically just upload the same client files to Itch, although you might have to set up CORS headers on your sever or something.

"Basically what you should do is host your PHP file on your own web server...."  It is possible. But, "on my own web server" I can host the game itself. But why then do I need ITCH.IO? For monetization only?

But why then do I need ITCH.IO?

I mean, you don't. Itch is (from my understanding) mainly designed as a marketplace for games. They host free stuff too because they're cool like that, but they're not really a replacement for a web host. If you're looking for someone to rent you a PHP server this isn't the place for that.