Thanks for writing your query.
After reading your post, it seems that you are having infection of gastrointestinal tract.
First of all you should get your stool examined (Routine/Microscopic and Culture /Senstivity) and for Occult blood.
You should get yourself examined by your doctor and take antacids like Ranitidine
150 mg twice daily along with antibiotic and antiamoebic(according to reports) under medical supervision.
Also follow precautions in your diet. Have light diet. Avoid spicy and oily foods.
Also get yourself examined for any piles and anal fissure
as they can also cause blood mixed stools.
I hope this is helpful to you.