Linkshare product serach api code

Here is the simple code to fetch product from all the affiliate using Linkshare , Linkshare product serach api code

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPGET, TRUE);
$url2="http://productsearch.linksynergy.com/productsearch?token=8dcb9db02dce5b1123f84d8950beb34de9bfb0169dc6fca4146a059926f0239b&MaxResults=60&pagenumber=1&keyword=".$_GET['v']."&sort=retailprice&sorttype=asc&sort=productname&sorttype=asc";
curl_setopt($ch, CURLOPT_URL, $url2);
$xml_data = curl_exec($ch);
curl_close($ch);
$object = simplexml_load_string($xml_data);
foreach($object->item as $signprod)
{
print_r($signprod); 
}

Select all data from MySQL where date between two given dates

Here is the simple MySQL query to fetch data between given date range

See MySQL query



$f_date=$_REQUEST['f_date'];

$t_date=$_REQUEST['t_date'];

"SELECT * FROM sales WHERE  sales_invoice_date between '".date('Y-m-d',strtotime($f_date))."' and '".date('Y-m-d',strtotime($t_date))."' "

To Fetch all the sales data in the given date

"SELECT * FROM sales WHERE sales_invoice_date='".date('Y-m-d',strtotime($f_date))."'" 

To fetch Today’s Sales

SELECT * FROM sales WHERE STR_TO_DATE(sales_invoice_date , '%d-%m-%Y') = CURDATE()

how to install let’s encrypt ssl certificate in centos using SSH command

Nowadays hacking is so simple,with out much technical extreme anybody can access other data,so it is important to encrypt the data when it exchange between the system,fortunately we have a standard security protocol called ssl to encrypt our data,among the ssl certificate let’s encrypt certificate is most popular and it is free.So we will discuss how to install let’s encrypt ssl certificate in centos using SSH command.We have certbot is their to do that. we will check each steps one by one

Login to ssh window

1) Download Certbot

#wget https://dl.eff.org/certbot-auto

2) Move Certbot to /usr/local/bin/

#sudo mv certbot-auto /usr/local/bin/certbot-auto

3) Change certbot-auto folder Owner to root

#sudo chown root /usr/local/bin/certbot-auto

4) Change certbot-auto folder permission to 755

#sudo chmod 0755 /usr/local/bin/certbot-auto

5) Install let’s encrypt ssl certificate in centos using SSH command

#sudo /usr/local/bin/certbot-auto --apache