The automatic detection of seizures bears a considerable significance in epileptic diagnosis as it can efficiently lead to a considerable reduction of the workload of the medical staff. The present study aims at automatic detecting epileptic seizures in epileptic rats. To this end, seizures were induced in rats implementing the pentylenetetrazole model, with the electrocorticogram (ECoG) signals during, before and after the seizure periods being recorded. For this purpose, five algorithms for transforming time series into complex networks based on visibility graph (VG) algorithm were used. In this study, VG based methods were used for the first time to analyze ECoG signals in rats. Afterward, Standard measures in network science (graph properties) were made to examine the topological structure of these networks produced on the basis of ECoG signals. Then these measures were given to a classifier as input features so that the ECoG signals could be classified into seizure periods and seizure-free periods. Artificial Neural Network, considered a popular classifier, was used in this work. The experimental results showed that the method managed to detect epileptic seizure in rats with a high accuracy of 92.13%. Our proposed method was also applied to the recorded EEG signals from Bonn database to show the efficiency of the proposed method for human seizure detection.