$local_str = "C:\images\image.gif";
// Check for the last \ in that string
$pos = strrpos("\", $local_str);
// Copy the right part
$local_file = substr($local_str, $pos + 1);
// Then just append it to your remote path
$remote_path = "http://host/image/";
$remote_filename = $remote_path . $local_file;
// Now $remote_filename has the desired string value
Now all you have to do is just copy it.
Greetz,
Vincent Driessen
Venlo, The Netherlands