note 118249 deleted from function.fsockopen by cmb
| From: | cmb@php.net | Date: | Sun, 10 Nov 2019 12:54:33 +0000 |
| Subject: | note 118249 deleted from function.fsockopen by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213010@lists.php.net to get a copy of this message | ||
Note Submitter: php at hatzidakis dot org
----
Although undocumented, it seems that $hostname can be a "<hostname>:<port>"
string:
<?php
if (fsockopen("www.google.com:80", 80)) {
echo "Success!";
}
else {
echo "Fail";
}
?>