Thanks for writing your query,
After reading your post, it seems that you have suffered from Concussion injury
It occurs due to some biochemical changes in the brain as a result of head injury
It takes few days to weeks for complete recovery from concussion.
Recovery is quickened by taking proper rest, which includes avoiding watching television/computers and even text messaging.
You can take pain killer like Ibuprofen
one tablet twice a day after meals along with an antacid
If the problem persists, get yourself examined by a Neurophysician.
Also get a scan of your head done.
I hope this is helpful to you.