  The extragalactic background light (EBL) contains important information about
stellar and galaxy evolution. It leaves imprint on the very high energy
$\gamma$-ray spectra from sources at cosmological distances due to the process
of pair production. In this work we propose to {\em measure} the EBL directly
by extracting the collective attenuation effects in a number of $\gamma$-ray
sources at different redshifts. Using a Markov Chain Monte Carlo fitting
method, the EBL intensities and the intrinsic spectral parameters of
$\gamma$-ray sources are derived simultaneously. No prior shape of EBL is
assumed in the fit. With this method, we can for the first time to derive the
spectral shape of the EBL model-independently. Our result shows the expected
features predicted by the present EBL models and thus support the understanding
of the EBL origin.
