clem_c_rock
Registered
Hello,
I am writing a script that uses sockets to attach to a local computer and read a mysql dump file. Now I've successfully achieved this on a windows machine w/ no problem using this simple method:
#---- create connection to local machine -----------
$remote_address = getenv( "REMOTE_ADDR" );
$fp = fsockopen( $remote_address, 80);
if( $fp ){ echo "<br>CONNECTED"; }else{ echo "<br>NOT CONNECTED"; }
fputs($fp,"GET http://$remote_address/admin/upload_download/mysql_dumps/download_dump_file HTTP/1.0\n\n");
#---- now read the contents -------
while(!feof($fp))
{
$value = fgets($fp,1024);
}
#--------------------------------------
When I try this same concept on a Mac OS X w/ php/mysql running, it won't connect. Is there a problem w/ the port I'm connecting to?
Thanks for your concern,
Clem C.
I am writing a script that uses sockets to attach to a local computer and read a mysql dump file. Now I've successfully achieved this on a windows machine w/ no problem using this simple method:
#---- create connection to local machine -----------
$remote_address = getenv( "REMOTE_ADDR" );
$fp = fsockopen( $remote_address, 80);
if( $fp ){ echo "<br>CONNECTED"; }else{ echo "<br>NOT CONNECTED"; }
fputs($fp,"GET http://$remote_address/admin/upload_download/mysql_dumps/download_dump_file HTTP/1.0\n\n");
#---- now read the contents -------
while(!feof($fp))
{
$value = fgets($fp,1024);
}
#--------------------------------------
When I try this same concept on a Mac OS X w/ php/mysql running, it won't connect. Is there a problem w/ the port I'm connecting to?
Thanks for your concern,
Clem C.