Change listening port on file_get_contents(‘php://input’)

  json, php

I need to receive JSON data on a port different from the standard https 443 (for example, port 3000).
I tried to use: file_get_contents(‘php://input:3000’) but it does not work.
Any suggestion on the right sintax and/or a config parm that needs to be added?

My code:
$input=file_get_contents(‘php://input:3000’);
$datainput = jsonDecode($input, true);

Source: Ask PHP

LEAVE A COMMENT