Current methods for the detection of contagious outbreaks give contemporaneous information about the course of an epidemic at best. Individuals at the center of a social network are likely to be infected sooner, on average, than those at the periphery. However, mapping a whole network to identify central individuals whom to monitor is typically very difficult. We propose an alternative strategy that does not require ascertainment of global network structure, namely, monitoring the friends of randomly selected individuals. Such individuals are known to be more central. To evaluate whether such a friend group could indeed provide early detection, we studied a flu outbreak at Harvard College in late 2009. We followed 744 students divided between a random group and a friend group. Based on clinical diagnoses, the progression of the epidemic in the friend group occurred 14.7 days (95% C.I. 11.7-17.6) in advance of the randomly chosen group (i.e., the population as a whole). The friend group also showed a significant lead time (p<0.05) on day 16 of the epidemic, a full 46 days before the peak in daily incidence in the population as a whole. This sensor method could provide significant additional time to react to epidemics in small or large populations under surveillance. Moreover, the method could in principle be generalized to other biological, psychological, informational, or behavioral contagions that spread in networks.