How to fill in address data through the CNPJ? [closed]

-3

I am setting up a client registration via the Web and would like to know if it is possible to automatically fill in the address data by filling in the CNPJ field?

    
asked by anonymous 21.10.2016 / 20:34

3 answers

3

You can try searching for the CNPJ in the federal income website .

Process

  • Use some curl or soap service via server to simulate a client and retrieve information.
  • Use an HTML parser to retrieve the desired data.

Problems

  • It has captcha, but for my tests only the need to fill once, after that just consult normally.
  • It has a session timer
  • for the captcha of + or - 5min.
21.10.2016 / 20:56
0

I do not know of a framework that can bring this "tray" information to you, I do not think it exists.

A database service will be required, in which there will be at least cnpj (primary key), address, zip, etc.

For development, you can use mySql with xampp or wampServer. =)

    
21.10.2016 / 20:45
0

There are some companies that make this available:

link

But a charge is made per query.

    
21.10.2016 / 20:51