Jump to content

European VAT module


trestrado

Recommended Posts

Please, can someone change funcion

 

for ($i = 0; $i < 3; $i++)
 {
  if ($pageRes = file_get_contents($url))
  {
   if (preg_match('/invalid VAT number/i', $pageRes))
   {
 @ini_restore('default_socket_timeout');
 return array(Tools::displayError('VAT number not found'));
   }
   else if (preg_match('/valid VAT number/i', $pageRes))
   {
 @ini_restore('default_socket_timeout');
 return array();
   }
   else
 ++$i;
  }
  else
   sleep(1);
 }

 

to work through curl please

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...