how to insert data into tally using php?

curl, httprequest, php

Solution

instead of

$server = 'LOCALHOST:9000';

give

$server = '10.0.0.155:9000';

Problem

i have fetch data from tally erp 9.0 using this code, ``` <?php $requestXML = '<ENVELOPE>'. '<HEADER>'. '<TALLYREQUEST>Export Data</TALLYREQUEST>'. '</HEADER>'. '<BODY>'. '<EXPORTDATA>'. '<REQUESTDESC>'. '<REPORTNAME>Daybook</REPORTNAME>'. '<STATICVARIABLES>'. '<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>'. '</STATICVARIABLES>'. '</REQUESTDESC>'. '</EXPORTDATA>'. '</BODY>'. '</ENVELOPE>'; $server = 'LOCALHOST:9000'; $headers = array( "Content-type: text/xml","Content-length:".strlen($requestXML) ,"Connection: close"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $server); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $requestXML); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $data = curl_exec($ch); if(curl_errno($ch)){ print curl_error($ch); echo " something went wrong..... try later"; }else{ echo " request accepted"; print $data; curl_close($ch); } ``` But my problem is how to push(insert) data into Tally ERP 9.0 using php(curl).

Original source