Thursday, April 20, 2017

How to send ANSI corrector in mail subject using mail function in PHP

Let's say your subject is - "Cómo estás" (that mean - cómo estás )
if you will send this subject then it will not show properly in an email.

So how to solve this issue-:

$subject = "cómo estás";
mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $body, $headers);

------------
if this code doesn't work for you then le tme know. I Have another solution too. :-)

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
}
?>