Experimenting with creating a mambot

Locked
jim.thornton
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 226
Joined: Sat Jan 27, 2007 11:12 pm

Experimenting with creating a mambot

Post by jim.thornton » Mon Aug 18, 2008 1:29 am

I have decided to give it a go. For a long time, I searched around for a bot/module that would force any specific page to use SSL. The problem I was finding is that if I just used the HTTPS:// for the link that led to that page that when they were done it would go back to the main page and still be using https. The other problem that I found is that if a user typed in http://www.mydomain.com/application for example that the application page would not use SSL.

I asked many times in the forums and no one ever had an answer for me. I discovered a way around it by using the JUMI bot and including a file which checked to see if HTTPS was being used and if not it would redirect it to the same page but using https.

I've decided to try an make my own bot for two reasons:

1. It is I think a simple enough task to give it a go.
2. I would like to create a mambot that will check for this functionality and then turn on/off the SSL.

My Question:

In some of the bots that I've been looking at and in the developers manual, I see:

$regex = "#{moslinks*(.*?)}#s";

I'm no expert when it comes to regex's but I've played with them a few times. Why does it start with # and end with #s? What does this accomplish?

Locked

Return to “Joombie Coding Q/A”