Sunday, January 29, 2017

[Resolved] How to cancel all sent friendship request on Facebook at one click

Cancel all pending Friendship Request in 30 second. Just in one click.

Step-: 01 Click on Below Link

 https://m.facebook.com/friends/center/requests/outgoing/#friends_center_main 


Step -: 02  Right click on page and select inspect



Step -: 03  Paste below code in console and then hit enter. (wait few second to complete the request)


javascript:var inputs = document.getElementsByClassName('_54k8 _56bs _56bt'); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }



Sunday, January 1, 2017

How to set custom comment limit for textarea like twitter

Do you want something like this


Checkout this video





Download Full Code


Friday, October 28, 2016

How to find how many parameter / Arguments has been passed and there value

code-
<?php
    function parentFunction($name='name') {
        echo "There are total: ".func_num_args()." Arguments passed.<BR>";
        $args = func_get_args();

echo '<pre>';
print_r($args);
echo '</pre>';

//fetch the value
        for($i = 0; $i < count($args); $i++) {
echo "Passed Value: {$args[$i]}<br />";
        }
      }
    parentFunction($name= 'name','email','phone','location');
?>

login authentcation via browser prompt using PHP




<?php
if (($_SERVER['PHP_AUTH_USER'] != 'a') || ($_SERVER['PHP_AUTH_PW'] != 'a')) {
      header('WWW-Authenticate: Basic Realm="Secret Stash"');
      header('HTTP/1.0 401 Unauthorized');
      print('You must provide the proper credentials!');
      exit;
   }
else{
echo 'login done';
//do stuff here
}
?>

Extract Only numbrs from long string using Regex with PHP (Regular Expressions)

Here is a string -: RT4646R@TWBNSN3234FHFHFH893892389FHDJJD$

Now How will find all red marked numbers in an Array.Here is solution.




<?php
$string = 'RT4646R@TWBNSN3234FHFHFH893892389FHDJJD$';
$special_char = '\[#$%^&*()+=\-\[\]\';,.\/{}|":<>?~\\\\]';
preg_match_all('/\d+/', $string,$output);

echo '<pre>';
print_r($output[0]);
?>






Here is the output

PHP Regular Expressions





Author - 
sudhir k gupta | sudhir gupta | sudhir kumar gupta | eghara
Sudhir K gupta | Lonawala