Question how to code "multipart/form-data” in a PHP script ?
We are trying to make our program trchat.exe work via the following PHP script:
Underneath we have the operational javascript,
Removing all options in the form submit line, exept enctype="multip art/form-data" has no effect on the proper operation of trchat.exe.
Through PHP we are not able to send the , "multipart/form-data” which seems to be required for trchat.
Question how to code "multipart/form-data” in a PHP script ?
We are trying to make our program trchat.exe work via the following PHP script:
Code:
<?php $lang = " English to Dutch"; $postdata="select=".$lang."&TEXTAREA1=testtext"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://ling98.com/cgi-bin/trchat.exe'); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); $content = curl_exec ($ch); curl_close ($ch); print $content; ?>
Underneath we have the operational javascript,
Removing all options in the form submit line, exept enctype="multip art/form-data" has no effect on the proper operation of trchat.exe.
Code:
<SCRIPT LANGUAGE=JavaScript> var vertaal = "English to Dutch" var tekst = "textual test" mstr = '<form name="myform" action="http://ling98.com/cgi-bin/trchat.exe" method="post" enctype="multipart/form-data" runat="server" type="submit" >' mstr +='<Input type="text" name="TEXTAREA1" value="' mstr += tekst mstr += '" >' mstr +='<Input type="text" name="select" value="' mstr += vertaal mstr += '" >' mstr += '<input name="" type="submit">' mstr +='</form>' document.write (mstr); document.myform.submit(); </SCRIPT>
Through PHP we are not able to send the , "multipart/form-data” which seems to be required for trchat.
Question how to code "multipart/form-data” in a PHP script ?
Comment