From what you have described it is not a simple viral infection that your son has. As it has been for a long time and his curling up shows that there is cramping in his abdomen. You need to take him to a pediatrician
or a gastroenterologist who could tell you after a physical exam what exactly is wrong with him.
Is he passing a normal stool? Is he eating well? Many things need to be assessed along with some tests that can tell us exactly the problem and treatment accordingly.
So do not wait longer and take him to the physician.