The document presents a research article focusing on web-based application layer Distributed Denial-of-Service (DDoS) attacks and introduces an Anomaly-based Real-time Prevention (ARTP) framework that utilizes machine learning for effective detection. The framework distinguishes between legitimate and malicious requests, addressing the challenge posed by increasing volumes of DDoS traffic, particularly application layer attacks. Testing demonstrated the model's efficiency in real-time detection, affirming its adaptability to current web application demands.