1 Question: Is it permissible to chat with girls on the internet?
Answer: If it is feared that they might be drawn towards sin, it is not permissible. Normally chatting ends up in a sin for both sides.sistani.org/15508
2 Question: Can I be in a friendly relationship with a girl in my class.
Answer: All kinds of relations with a non-mahram including joking, expressing mutual love, talking with the intention of deriving pleasure, looking at the body of a girl (except her face and hands up to the wrists) and at her hair or looking at her face with pleasure are Haram (forbidden). In fact, if it is feared that they might fall into a sin, it is forbidden for them to have any kind of relationship with each other.sistani.org/25287