Hi
Im having troubles with an online checker
$link = $linksdata['link'];
$cslink = strtok($link,"@");
$cnum = strlen($cslink)+1;
$ftpip = strtok(substr($link,$cnum),":");
$cnum2 = strlen($cslink)+strlen($ftpip)+2;
$ftpport = substr($linksdata['link'],$cnum2);
$ftpport2 = -(strlen($ftpport));
$ftpport = substr($ftpport,$ftpport2,-1);
$linkcheck = @fsockopen ("$ftpip",$ftpport,$errno,$errstr,10);
if (!$linkcheck)
{
$status = "Down";
}
else
{
$status = "Online";
@fclose ($linkcheck);
}
the problem in my code is that if I add the full path to where the scripts are located in my servers it will show them as down
only works when I don't add the full path I wnat to know if there is any way to extract the port even if I add full path like this
[url]ftp://blabla:blabla@123.456.789:21/mynewscripts/scriptname.mrc[/url]
thanks in advance