Screenshot script not uploading PNG to server when used with key trigger

Hello. I have tried using the script provided in the Unity documentation for uploading the screenshot to the server. It seems to work and upload the PNG to the server.
I modified the script to run on a “Jump” button trigger. But it does not seem to work. The “Jump” button is not used by any other script.
Here is the script
#pragma strict

function UploadPNG() { 
 
// We should only read the screen after all rendering is complete 
yield WaitForEndOfFrame();

// Create a texture the size of the screen, RGB24 format
var width = Screen.width;
var height = Screen.height;
var tex = new Texture2D( width, height, TextureFormat.RGB24, false );
// Read screen contents into the texture
tex.ReadPixels( Rect(0, 0, width, height), 0, 0 );
tex.Apply();
 
// Encode texture into PNG
var bytes = tex.EncodeToPNG();
Destroy( tex );
 
// Create a Web Form
var form = new WWWForm();
form.AddField("frameCount", Time.frameCount.ToString());
form.AddBinaryData("file", bytes, "screenShot.png", "image/png");
 
// Upload to a cgi script
var w = WWW("www.mydomain-s.com/unity/screenshot4/screenshot4.php", form);
yield w;
if (w.error != null){
print(w.error);
Application.ExternalCall( "debug", w.error);
//print(screenShotURL);
}
else{
print("Finished Uploading Screenshot");
//print(screenShotURL);
Application.ExternalCall( "debug", "Finished Uploading Screenshot");
}
  
} 

	
function Update () {

        if(Input.GetButtonUp("Jump")){
            UploadPNG();
        }
    }

And here is the php script

    <?php
    if ((($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 20000000000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "
    "; } else { echo "Upload: " . $_FILES["file"]["name"] . "
    "; echo "Type: " . $_FILES["file"]["type"] . "
    "; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
    "; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "
    ";
     
    if (file_exists("upload/" . $_FILES["file"]["name"]))
    {
    echo $_FILES["file"]["name"] . " already exists. ";
    }
    else
    {
    move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
    echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
    }
    }
    } else { echo "Invalid file"; }
    ?>

The web directory “Upload” has the write permissions set.

I’m stuck at it since hours. Would really appreciate the help.

Its solved. You need to add full URL with “http” in the www function.

Thanks ArkaneX. Appreciate your time.