Vehicular-to-anything (V2X) technology is attractive for wireless vehicular ad-hoc networks (VANETs) because it allows for opportunistic choice of a vehicular protocol between vehicular-to-vehicular (V2V) and vehicular-to-infrastructure (V2I) communications. In particular, achieving seamless connectivity in a VANET with nearby network infrastructure is challenging. In this paper, we propose a density-based opportunistic broadcasting (DOB) protocol, in which opportunistic connectivity is carried out by using the nearby infrastructure and opposite vehicles for solving the problems of disconnection and long end-toend delay times. The performance evaluation results indicate that the proposed DOB protocol outperforms the considered comparative conventional schemes, i.e., the shortest path protocol and standard mobile WiMAX, in terms of the average endto-end delay, packet delivery ratio, handover latency, and number of lost packets.