conn = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD); $ok = mysqli_select_db($this->conn,DB_NAME); if (!$ok) return false; $this->get_options(); // plugin disabled if (!$this->enable) return; // current request is admin's one if (isset($_COOKIE['wpantiddos']) && $_COOKIE['wpantiddos']==$this->cookie) return; if ($this->only_params_enabled) if (!$this->only_param_detected()) return; // detect request type and limits if ($this->xhr_request()) { if ($this->hits_limit_XHR=='ANY') return; $request_type = 'xhr'; $hits_limit = $this->hits_limit_XHR; $seconds_limit = wpadtiddos_seconds_limit_XHR; } elseif ($_POST && isset($_POST[$this->pass_param]) ) { if ($this->seconds_limit_AUTH=='ANY') return; $request_type = 'auth'; $seconds_limit = $this->seconds_limit_AUTH; $this->only_params .= ' '.$this->pass_param; $hits_limit = 1; } elseif ($_POST) { if ($this->seconds_limit_POST=='ANY') return; $request_type = 'post'; $hits_limit = 1; $seconds_limit = $this->seconds_limit_POST; } else { if ($this->hits_limit_GET=='ANY') return; $request_type = 'get'; $hits_limit = $this->hits_limit_GET; $seconds_limit = wpadtiddos_seconds_limit_GET; } if ($this->send_header) header("WP_AntiDDOS: yes"); if ($this->cloudflare) { if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; } $this->ip = $_SERVER['REMOTE_ADDR']; if ($this->block_cnet) $this->ip = substr($this->ip,0,strrpos($this->ip,'.')+1); $this->warm_level = ceil($hits_limit/2); try { $res = mysqli_query($this->conn,"SELECT count(*) kount FROM $this->table_name WHERE ip='".addslashes($this->ip)."' AND tstamp>".(time()-$seconds_limit)." AND type='$request_type'"); $row = mysqli_fetch_assoc($res); if (!$row) $this->error_msg = 'Error detected'; $this->hits = @$row['kount']+1; // consider current request too if ($this->hits==0) // if no hits from this IP $this->visitor = "new"; elseif ($this->hits>$hits_limit) $this->visitor = "hot"; elseif ($this->hits>=$this->warm_level) $this->visitor = "warm"; else $this->visitor = "cool"; // add current hit mysqli_query($this->conn,"INSERT INTO $this->table_name SET ip='$this->ip', type='$request_type', tstamp=".time()); // cleanup ip list $clear_time = max($this->delay_time,$seconds_limit); mysqli_query($this->conn,"DELETE FROM $this->table_name WHERE tstamp<".(time()-$clear_time)); } catch(Exception $e) { $this->error_msg = $e->getString(); $this->status = 'error'; mysqli_close($this->conn); return; } mysqli_close($this->conn); if (!empty($this->error_msg) ) { $this->status = 'error'; } if ($this->auto && $this->visitor=='hot') { header('HTTP/1.0 503 Service Unavailable'); header('Status: 503 Service Unavailable'); header("Retry-After: ".($this->delay_time+1)); // submit form first if POST request if (!$_POST) print ""; else { $inputs = $this->array_to_fields($_POST); print '
'. $inputs. '
'; } if ($request_type=='auth') printf("

$this->delay_message_auth

",$this->delay_time); else printf("

$this->delay_message

",$this->delay_time); die(); } } function xhr_request() { if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { if ($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest') return true; } else { $headers = getallheaders(); if (isset($headers['X-Requested-With']) && $headers['X-Requested-With']=='XMLHttpRequest') return true; } return false; } public function get_options() { global $table_prefix; $result = mysqli_query($this->conn,"SELECT option_name, option_value FROM {$table_prefix}options WHERE option_name LIKE 'Wpantiddos_Plugin_%'"); while ($row = mysqli_fetch_assoc($result)) { $name = str_replace('Wpantiddos_Plugin_','',$row['option_name']); $value = $row['option_value']; if ($value==='Yes') $value = true; if ($value==='No') $value = false; if (isset($this->$name)) $this->$name = $value; } } public function only_param_detected() { $acual = array_merge(array_keys($_GET),array_keys($_POST)); $found = array_intersect($acual,explode(' ',trim($this->only_params))); return $found; } function array_to_fields($fields, $prefix = '') { $form_html = ''; foreach ($fields as $name => $value) { if ( ! is_array($value)) { if ( ! empty($prefix)) { $name = $prefix . '[' . $name . ']'; } // generate the hidden field $form_html .= "\n"; } else { if ( ! empty($prefix)) { $subprefix = $prefix . '[' . $name . ']'; } else { $subprefix = $name; } $form_html .= array_to_fields($value, $subprefix); } } return $form_html; } } ?> Curry Archives - Foody Talks
Home / Curry

Curry

Fish Curry, Mutton Curry, Srilankan Curry, dahi curry, curry

  • Chicken Jalfrezi

    Chicken Jalfrezi is something we normally eat at restaurants, hence it is something which everyone s...

  • Sri Lankan Fish Curry

    Ingredients: 1kg fish steaks,thick chunky fish steaks are ideal 2meadium onions,finely chopped 1tspn...

  • Avirekay curry

    Preparation Time : 15 mins (not including the soaking time and of course time spent on peeling the b...

  • Palak Paneer

    Cottage cheese blocks in a mildy spiced Spinach purée gravy Ingredients : 1 pack Frozen paneer 1 bun...

  • Chicken do Pyazza

    You might have heard of the word ‘Do’ or two ‘pyazza’ onions, two onions or ...

Chicken Jalfrezi

Chicken Jalfrezi is something we normally eat at restaurants, hence it is something which everyone should try cooking at home, chicken Jalfrezi refers to the cooking style rather than the dish, Jalfrezi is derived from Jald/Jaldi/Quick and 'frezi' is to ...

Read More »

Chicken do Pyazza

You might have heard of the word ‘Do’ or two ‘pyazza’ onions, two onions or double onions, hence you must try it. It has a distinctively thick yogurt sauce packing a medium level of heat, (remember if you want best ...

Read More »

Potato Soya Chunks Curry

Aaloo Soya Vadi Sabzi - Potato Soya Chunks Curry This Sabzi / Curry goes really well with either roti, puri, parantha or rice, as you may like. Ingredients: ▪Boiled potatoes ▪Soya Nuggets ▪Sliced Onions ▪Tomato concasse. de-skin the tomatoes and ...

Read More »

Sri Lankan Fish Curry

Ingredients: 1kg fish steaks,thick chunky fish steaks are ideal 2meadium onions,finely chopped 1tspn ginger finely Chopped 2 cloves garlic finely chopped 2tbsp Sri Lankan curry powder. 1tbsp turmeric powder 1tbsp black pepper 1tsp salt 1tsp fenugreek/powder 1small cinnamon stick 8curry ...

Read More »

Avirekay curry

Preparation Time : 15 mins (not including the soaking time and of course time spent on peeling the bean off) Cooking Time : 20 mins Cuisine : Andhra Ingredients Needed: Avireykay - 250 gms Potatoes - 1 (optional) Onions - ...

Read More »

Breadfruit Curry (Sri Lankan Dish)

Ingredients: Breadfruit Onion Green Chilli Ginger Curry Leaves Garlic Spices (Cinnamon, Cardamom, cloves, black pepper) Coconut Milk (First and Second extract) Method: Cut the breadfruit as required cubes; wash it with salt and turmeric powder. Mix with chilli, curry powder. ...

Read More »

Srilankan Spicy Mutton Curry

Ingredients : 250 gms mutton 1 tbs Lemon juice/ vinegar 1 finely chopped onion 1 tbs finely chopped garlic/paste 1 tbs finely chopped ginger/paste 1/2 cup oil 1 tsp turmeric powder 5 finely chopped Green chillies 5 curry leaves Salt ...

Read More »

Palak Paneer

Cottage cheese blocks in a mildy spiced Spinach purée gravy Ingredients : 1 pack Frozen paneer 1 bunch Spinach leaves 1 tbsp dried fenugreek leaves( kasuri methi) 2 Onions 1 tbsp Ginger Garlic paste 1 tsp tomato paste 1 tbsp ...

Read More »

Duck Curry

2 ½ lbs skinless duck thighs cut in half Juice of 1 lime 3 cloves garlic, crushed 5 sprigs thyme 1 Thai chilli pepper 3 scallions finely chopped 1 medium onion finely chopped 1 tsp salt 1 chicken bouillon 3 ...

Read More »