Thursday, 30 March 2017

get the data from curl

$ch = curl_init();
$curlConfig = array(
CURLOPT_URL => 'http://103.47.150.63/madaan-distributor/action.php',
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => array(
'field1' => 'some date',
'field2' => 'some other data',
)
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
print_r($result);
curl_close($ch);



$data = array(
    "client_id"=>"587c967a4e95b878b0c3bd24", // Use client_id instead of cliend_id
    "secret"=>"841e180a4e400e8b83ae7891a1e800",
    "public_token"=>"658dbac55a033d2195dc98feeadaaa",
"type"=>"wells",
"username"=>"plaid_test",
"password"=>"plaid_good"
);
    $string = http_build_query($data);

    

    //initialize session
    $ch=curl_init("https://tartan.plaid.com/connect");

    //set options
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    //execute session
//echo $ch;
    $exchangeToken = curl_exec($ch);
    echo $exchangeToken;
//echo json_encode($exchangeToken, JSON_PRETTY_PRINT);
    //close session
    curl_close($ch);

Wednesday, 29 March 2017

html dom manupulation

http://stackoverflow.com/questions/3820666/grabbing-the-href-attribute-of-an-a-element
http://www.binarytides.com/php-tutorial-parsing-html-with-domdocument/

how to remove special char from email

$str = utf8_decode($message);
$message = str_replace(" ", " ", $str);

Tuesday, 28 March 2017

Laravel undefined function openssl_encrypt()

http://stackoverflow.com/questions/38582389/laravel-undefined-function-openssl-encrypt

how t oremove laravel public from url

http://stackoverflow.com/questions/23837933/how-can-i-remove-public-index-php-in-the-url-generated-laravel

Wednesday, 15 March 2017

paypal validation issue

We are unable to validate your information. Please try again

PayPal's sandbox has a bug. Delete your cookies and it will work.
http://stackoverflow.com/questions/23816517/we-are-unable-to-validate-your-information-please-try-again

Thursday, 9 March 2017

Unable to select the specified database: xxxxx Filename: core/Loader.php Line Number: 346

database setting on liver server like godaddy .Dont use you host name as hostname like xyz.com  instead  of that use dbhost="localhost"