Welcome to Healthcaremagic
From your history it appears that whenever you go to motion it is painful and bleeding from your anus during the act. It looks like a fissure in anus which is a small superficial tear of skin at your anus most likely due to hard stools. It has nothing to do with headache. But of course, if there is too much blood loss, it may make you dizzy. Headache needs to be evaluated by a physician; and for the pain and bleed, first try laxatives and sit in warm water (only warm water) 10 minutes in morning and evening. If it does not settle in 3 days or else you have fever
, see a surgeon.