How do I fill address data through CNPJ?

Asked

Viewed 518 times

-3

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

3 answers

3


You can try searching the CNPJ on website of the IRS.

Process

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

Problems

  • Has captcha, but by my tests only need to fill once, after this just consult normally.
  • Has a timer from session to captcha of + or - 5min.

0

I don’t know any framework that can bring this "tray" information to you, I don’t think it exists.

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

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

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.