—At the present, the traffic is really in a mess when the number of vehicles is increasing rapidly. As a consequence, finding a parking space is remarkably difficult and expensive. Therefore, solving this problem has attracted the attention of both scientists and companies. Our study also focuses on solving parking problem to relieve the traffic congestion, reduce air pollution and enhance driving effectively. However, unlike other studies, we consider parking problem in the view of IoT. From this perspective, Fog Computing and Roadside Cloud are utilized to find a vacant spot. By utilizing this infrastructures, any parking space at many places can be shared. Then, we analyze and apply the matching theory to solve the parking problem. Accordingly, our proposal not only helps drivers finding an ideal available space but also brings the owners of these places profit. Simulation results demonstrate that the proposed approach is a reliable solution for the finding parking slot.