There has been an explosion in the popularity of OSNs in recent years. Users
can communicate and share any data through these services. The primary drawback of
these OSN services is the invasion of the user's privacy. For precise filtering outcomes,
we employ sample matching and textual content class sets of rules. We advocate for a
system that gives OSN users complete editorial control over the content of their wall
posts. There may be a grey area in which the usage of rule-based mobile devices
permits customers to personalize the filtering process applied to their user profiles. A
learning system can automatically label messages to aid with content-based filtering
keywords: online social networks, filtering rules, devices, content-based filtering, and
system learning. Globalization is reaching a significant level. In this study, we propose
a more robust filter in PHP, based on the Validation Laravel framework, to circumvent
the insufficient protections offered by OSN. We sort messages into desirable and
unwanted groups in the first stage. In the second stage, spam messages are again sorted
by kind. Both communications and users might be banned from being sent or received.
If a user is blocked, they cannot post again until the blocklist is removed.
Keywords: Artificial intelligence, Clustering, Message filtering, Machine learning, Online networking, Security, Social network.