Narrative:

Shortly after takeoff from ZZZ1 during early morning haze, was in process of locating ZZZ2 VOR and setting up flight following from ZZZ3 approach control. Approach control advised that I had penetrated temporary restr area and instructed change of heading which I followed, controller said I had penetrated boundary by 2 miles. After clearing restr space I continued on planned flight.

Google
 

Original NASA ASRS Text

Title: SMA PLT ENTERED A TFR AIRSPACE ACCIDENTALLY AT ZZZ, US.

Narrative: SHORTLY AFTER TKOF FROM ZZZ1 DURING EARLY MORNING HAZE, WAS IN PROCESS OF LOCATING ZZZ2 VOR AND SETTING UP FLT FOLLOWING FROM ZZZ3 APCH CTL. APCH CTL ADVISED THAT I HAD PENETRATED TEMPORARY RESTR AREA AND INSTRUCTED CHANGE OF HDG WHICH I FOLLOWED, CTLR SAID I HAD PENETRATED BOUNDARY BY 2 MILES. AFTER CLRING RESTR SPACE I CONTINUED ON PLANNED FLT.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.