Last active
January 3, 2017 03:37
-
-
Save dancr13/4b617dff50e7a9c535a22f52f8aa8a5a to your computer and use it in GitHub Desktop.
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 | |
class RemoteConnect | |
{ | |
public function connectToServer($serverName=null) | |
{ | |
if($serverName==null){ | |
throw new Exception("That's not a server name! "); | |
} | |
$fp = fsockopen($serverName,80); | |
return ($fp) ? true : false; | |
} | |
public function returnSampleObject() | |
{ | |
return $this; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment