Skip to content

Instantly share code, notes, and snippets.

@dancr13
Last active January 3, 2017 03:37
Show Gist options
  • Save dancr13/4b617dff50e7a9c535a22f52f8aa8a5a to your computer and use it in GitHub Desktop.
Save dancr13/4b617dff50e7a9c535a22f52f8aa8a5a to your computer and use it in GitHub Desktop.
<?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