<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function get_calender_events() { $params = array(); /*Get current date*/ $current_date = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key = "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url, ...
global $product; $current_user = wp_get_current_user(); $useriid = $current_user->data->ID; $meta = get_user_meta( $useriid ); if($bpid == ""){ $productid = implode('-',$spid); $pdfcode = $spid[0]; }else{ $productid = $bpid; $pdfcode = $bpid; } $text = "demo".$order_id."-".$pdfcode."-1"; $url ='http://www.demo.in/wp-content/themes/wisdomstore/dompdf/barcode.php'; $fields = array( 'text' => $text, ); //open connection $server = '103.195.184.60'; $host = 'thewisdomstore.in'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $server); /* set the user agent - might help, doesn't hurt */ curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); /* try to follow redirects */ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); /* timeout after the specified number of seconds. as...