Last active
August 19, 2019 07:22
-
-
Save ptflp/d02beb034da03a4fc396b71bafefd5b7 to your computer and use it in GitHub Desktop.
check xdebug connection on interface and port PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$interface = '0.0.0.0'; | |
$port = 9000; | |
$sock = socket_create(AF_INET,SOCK_STREAM,0); | |
socket_bind($sock, $interface, $port) or die(); | |
socket_listen($sock); | |
$client = socket_accept($sock); | |
echo "connection established: $client"; | |
socket_close($client); | |
socket_close($sock); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment