1

I recently found out about PHP Desktop and I want to use it for one of my future apps. However, something I need to make sure is that the URL is always the same when the program runs. Sometimes it's 127.0.0.1:56162, sometimes it's 127.0.0.1:62425 or some other random number at the end... how can I make sure the link always stays the same?

noClue
  • 958
  • 1
  • 13
  • 34

1 Answers1

1

I figured out the answer:

  1. Open the settings.json file
  2. Replace the "0" on line 33 (listen_on) to a different port number. The dev recommends a port in the range of 49152–65535.

The "0" is the default value and will actually randomly pick a free port. If you want to have a specific port number every time, you'll have to hard code it there.

Relevant dev wiki page

noClue
  • 958
  • 1
  • 13
  • 34