Existence of Solutions for a Periodic Boundary Value Problem via Generalized Weakly Contractions