Live Streaming

Full Version: Ban user in the moment, not next time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When a user is reported in SVC he is not banned, his image get scumble (blurry), I try 2 report the same user 2 times and the user never get blurry. Can this be fix so the user is put out of the site insted of put him burry? If a user is bad reported (a user reported without a reason) there is a way he get his video without blurry (normal)?

I understand that as when the user is reported you get his IP/Id you can ban him to not enter next time he tries to enter the site but my problem is how to ban them to get them out of the site in the moment, not next time, I don´t think this can be done from the .htaccess file because as the user don´t reload the page at any time (because it is a flash site) he won´t reload the -htaccess file. There is anyway that the user can be ban and get him out of the site in the moment?
Yes, we tried this instant banning before and we anded up having zero online users and tens of thousands banned. You can set the config.php to ban users instantly (1). Since you will have an IP pool, you can use a script that is verifying the logged in user, every N seconds and blocks access if he's found in the pool. This can be done with javascript/php, without need to change the script. We are trying to make SVC very simple and robust, yet ready for modifications without need for action-script coder.
Please can you tell me what exactly I have to change in the config.php file to get this instant banning funcion?
PHP Code:
- this will blur the user instantly, you need to rewrite the php web service in order to restrict them from your site or create a .htaccess file:
order allow,deny
deny from
deny from
deny from
deny from
allow from all
What is the file I have to rewrite and what I have to put it?

If doing an .htaccess what I have to put on it? Please attach one so I can use it as a model
PHP Code:
 * Configuration file for SVC-SR 0.9+
 * Help:

/* database configuration */
$MYSQL_DB_HOST "localhost";                 // database host
$MYSQL_DB_PORT "3306";                      // database port (optional)
$MYSQL_DB_USER "";                          // database username
$MYSQL_DB_PASS "";                          // database password
$MYSQL_DB_NAME "";                          // database name

$VALID_INTERVAL 15;                         // sec.

/* connection settings */
$PING_INTERVAL 1000;                    // sec. - ping server for updates every N seconds
$REQUEST_CONFIG_INTERVAL 60 60000;        // min. - reload configuration file after N minutes
$INVITATION_SENT_TIMEOUT 1000;          // sec. - time to wait for a response (available/busy) from a pinged partner; starts after ping was sent
$FIND_NEXT_BUTTON_ACTIVATION_TIMEOUT 5;     // sec. - timeout (countdown) before NEXT button is activated; starts after successful connection
$FIND_NEXT_ACTIVATION_TIMEOUT 1000;     // sec. - idle (available) timeout before SVC starts to look for a new partner; starts after NEXT is pressed

/* system settings */
$FILTER_DENSITY 15;                         // number between 0-255 (the bigger = more intense blur)

$REPORTS_MAX_ALLOWED_PER_DAY 9;             // reported users exceeding this value will stay blurred for the day
$REPORTS_ABUSE_DETECTION_STRATEGY "IP";     // possible values: IP, USER. Determines the strategy for detecting user abuse

                                              // you may edit /config/config.xml to set web-service, config URLs and locale


change $REPORTS_MAX_ALLOWED_PER_DAY = 9; to $REPORTS_MAX_ALLOWED_PER_DAY = 1; use your original file, it may have different values

here is a .htaccess sample
order allow,deny
deny from
deny from
deny from
you must add all your denied user IPs, this can be done manually or using a script
So, for baning the user in the moment (not next time) it is a must to do this by script and not manually, if not manually it won´t be posible to add the IP so fast to ban the user in the moment at every moment, so please, can you send me the script needed to do this?
You don't need to edit or change SVC to achieve the above. The software was designed to give high flexibility for those, who aren't familiar with actionscript/Flex programming or Flash Builder platforms. Most additional features can be added just by using a simple PHP (or any other) script. In your case, you need the IP adresses. SVC is saving these in the MySQL table and you have the list, you can use and modify it as you wish, without editing the software.

Simply connect to your local database by including config.php and load all the ip adresses into an array. Later, you can use something similar to the following to display a warning and/or redirect the user to some landing page.
PHP Code:
$banned = array("""""");
   if (
in_array ($_SERVER['REMOTE_ADDR'], $banned)) {
"You are banned, redirecting...";