trestrado Posted November 11, 2012 Share Posted November 11, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now