$target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); echo "processing image file..."; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "I moved your file"; $fields = array(); $files = array( array( 'name' => 'photo', 'type' => 'image/jpeg', 'file' => $target_path )); $response = http_post_fields("http://twin.facedouble.com/docroot/gombu.pl", $fields, $files); echo "Im posting your file"; echo "This is the response"; echo $response; echo "OK";