The task is to bring the directory to the site.

I imagine it that way. We unload the directory in dbf (the algorithm is questionable). We transfer dbf-nickname to the server (LAMP) through POST, we process it using PHP, we drive the data into MySQL.

I understand that 1c itself does not know how to send GET / POST requests? And if 1c-ka I will form a text file with SQL-code for all the necessary inserts? Thus it will not be necessary to mess with dbf! This is a plus to universality, because the dbase module can be disabled at the hosting provider.

  • You can directly, for example, using EF Code First and Linq to EF on the example of 1C version 7.7 and 8.3 part I infostart.ru/public/393228 - Serginio

2 answers 2

It is best to connect the external component 1c ++ or Addin.MySQLConnection and use it to connect to the database directly. There is still a simple way: to create a text CSV file, in any way send / pick up to the server, and parse with php (or other server language) using the means. See examples at forum.mista.ru and infostart.ru .

  • And if the hoster does not directly connect to mysql? The first option does not fit. The second is to upload the file, then take it, and send it to the server, to the script - the accountant will have to do two actions already. Ideally, 1c-ka itself will turn to the php-script, transferring there with the post it all that is necessary, and the script, of course, parses, and inserts it into the database. - Roman St
  • Try it. Perhaps, through 1s ++. And in the second variant, everything can be automated, or simplified (also through 1c ++). - Ivan Lukyanov

Found on the network here is the code for the seven. About 1c + nothing is said

WinHttp=СоздатьОбъект("WinHttp.WinHttpRequest.5.1"); WinHttp.Option(2,"Windows-1251"); WinHttp.Open("POST","http://sta.gov.ua/control/uk/vat/search",0); // Вторым параметром передаем GET-данные // param1=value1&param2=value2" // WinHttp.SetProxy(0,"192.168.1.1:3128");// Задаем параметры своего прокси сервера // WinHttp.SetCredentials("ProxyLogin","ProzyPassword",1); // Задаем параметром логин и пароль // Если прямое соединение то так в коментах и оставлем :) WinHttp.SetRequestHeader("Accept-Language", "ru"); WinHttp.SetRequestHeader("Accept-Charset","Windows-1251"); WinHttp.setRequestHeader("Content-Language", "ru"); WinHttp.setRequestHeader("Content-Charset", "Windows-1251"); WinHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=Windows-1251"); ПараметрыПОСТ = "isJuridical=1" + "&individualCode="+СокрЛП(Контрагент.ЕДРПОУ); // Параметром передаем POST-данные для страници тут как раз WinHttp.Send(ПараметрыПОСТ); // Дальше или сохраняем страницу в файл Текст = СоздатьОбъект("Текст"); Текст.ДобавитьСтроку(WinHttp.ResponseText()); Текст.Записать(КаталогИБ() + "otvet.htm");