Decoding IR codes with IR sensor rather than IR receiver module
I had a similar project a few months back and spotted this Arduino Library:

https://github.com/z3t0/Arduino-IRremote

and it is invaluable.

For your instance, you want the RAW Data which you can achieve using an Example included in the Library named: IRrecvDemo.

The wiring is easy and straight forward


  An IR detector/demodulator must be connected to the input RECV_PIN.


Which is 11 by default but you can definitely change it :3

and the other two Legs of the IR detector/demodulator go to the power source.