_filname != _filename.
The reason the snippet you copied didn't work because there spelling errors. Correct the parameters and try again.
With AutoIt, read the file. Convert it to binary data and attach it the _filename parameter.
The php script needs to convert it back to original data (you either can use base64 or any similar data conversion method (the reason you need to convert is because you can't send some characters decoded)) and save it.
Use something like this:
PHP Code:
<?php
$file = fopen($_POST['_filename'], "w+");
fwrite($file,base64_decode($_POST['sorce']));
fclose($file);
?>
Code:
obj = ObjCreate("Microsoft.XMLHTTP")
$obj.open("POST","www.yoursite.to/index.php",False)
$obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
$obj.send("_filename=test.au3&sorce=" & _Base64Encode(FileRead("filename")))
Func _Base64Encode($sData)
Local $oXml = ObjCreate("Msxml2.DOMDocument")
If Not IsObj($oXml) Then
SetError(1, 1, 0)
EndIf
Local $oElement = $oXml.createElement("b64")
If Not IsObj($oElement) Then
SetError(2, 2, 0)
EndIf
$oElement.dataType = "bin.base64"
$oElement.nodeTypedValue = Binary($sData)
Local $sReturn = $oElement.Text
If StringLen($sReturn) = 0 Then
SetError(3, 3, 0)
EndIf
Return $sReturn
EndFunc