April 30, 2021 in News, Technology
Task Organizer | To Do List
Task Organizer App, it like jira task where you can record you daily activity, manage your account, store your lic contacts.

April 30, 2021 in News, Technology
Task Organizer App, it like jira task where you can record you daily activity, manage your account, store your lic contacts.

April 30, 2021 in News, Technology
Laughing adda is an entertainment app. Laughing adda provide you a platform where you can share your funny video, friendship jokes, husband wife jokes, Girls Boys, Math is Fun and much more which is moderated.

April 30, 2021 in Technology, Tips and Tricks
April 13, 2021 in News, Technology
Samsung is rumoured to launch its first-ever 5G-enabled Galaxy M series device – Samsung Galaxy M42 5G this month in the country. Now, ahead of the launch, Samsung Galaxy M42 5G pricing details have surfaced on the web, courtesy IANSLive. As per the report, Samsung Galaxy M42 will carry a price tag of under Rs. 25,000 in the country. If the reports are true, the Galaxy M42 5G will be amongst the affordable smartphones with 5G connectivity in the country. Let us take a look at the leaked specifications of the upcoming Galaxy M series smartphone,
Samsung Galaxy M42 5G: What we know so far?
The Galaxy M42 5G previously made an appearance on the Geekbench database with the model number SM-M426B. The Geekbench listing revealed that the smartphone will be powered by Qualcomm Snapdragon 750G SoC, along with Adreno 619 GPU and 4GB of RAM. Qualcomm Snapdragon 750G SoC is built on an 8nm fabrication process, and powers some popular mid-range smartphones such as Xiaomi Mi 10i.
Samsung Galaxy M42 5G will run Android 11 out of the box with the company’s proprietary One UI 3.0 skin on top. Going by 3C listing, the smartphone is confirmed to get a 6000mAh battery. The phone has already passed through Wi-Fi Alliance and Bluetooth SIG.
While, most other details about the Samsung Galaxy M42 5G remain unknown for now, but we can also expect the device to feature a large AMOLED display with a FHD+ resolution. The smartphone should feature a quad-rear camera setup with either 48MP or 64MP primary camera. If priced under Rs. 25,000 mark, the upcoming Samsung Galaxy M42 5G will go head to head against Xiaomi’s cheapest 5G smartphone – Mi 10i. What are your thoughts on the Samsung Galaxy M42 5G? Do you think Samsung will offer Indian consumers a better package compared to the Xiaomi Mi 10i? Do let us know in the comments below.
source:mysmartprice
April 2, 2021 in Technology
Course description
This course is for individuals who seek an overall understanding of the Amazon Web Services (AWS) Cloud, independent of specific technical roles. You will learn about AWS Cloud concepts, AWS services, security, architecture, pricing, and support to build your AWS Cloud knowledge. This course also helps you prepare for the AWS Certified Cloud Practitioner exam.
Course objectives
In this course, you will learn to:
Summarize the working definition of AWS
Differentiate between on-premises, hybrid-cloud, and all-in cloud
Describe the basic global infrastructure of the AWS Cloud
Explain the six benefits of the AWS Cloud
Describe and provide an example of the core AWS services, including compute, network, databases, and storage
Identify an appropriate solution using AWS Cloud services with various use cases
Describe the AWS Well-Architected Framework
Explain the shared responsibility model
Describe the core security services within the AWS Cloud
Describe the basics of AWS Cloud migration
Articulate the financial benefits of the AWS Cloud for an organization’s cost management
Define the core billing, account management, and pricing models
Explain how to use pricing tools to make cost-effective choices for AWS services
March 18, 2021 in E-Commerce, Only Happened In India, Php, Technology, Tips and Tricks
Job_Application Twig file content
{{ header }}
<style>
input#input_resume{
border: none;
border-radius: none;
outline-style: none;
box-shadow: none;
-webkit-box-shadow:none;
}
.bgimage{
/* background-image: url("F:/instaDiet/march/bg.jpg");
background-color: rgb(255, 255, 255);
opacity: 50%; */
position: relative;
z-index: 5;
}
.bgimage::after{
content: "";
position: absolute;
background-image: url("F:/instaDiet/march/bg.jpg");
opacity: .7;
z-index: 2;
left: 0px;
top: 0px;
display: block;
}
.gen{
margin-left: -15px;
margin-right: -15px;
}
textarea.form-control {
height: 110px;
}
h1.bredcrump-head.text-center{
display: none;
}
#landing1 i {
position: absolute;
}
#landing1 button.btn.btn-xl {
margin: 0px;
border-radius: 6px;
}
#landing .logo-icon li {
padding-right: 20px;
}
#landing .logo-icon li p {
font-size: 10px;
}
#landing1 .f {
padding-left: 15px;
padding-right: 15px;
padding-top: 6px;
}
#landing1 .f ul li {
font-size: 15px;
letter-spacing: 2px;
padding-bottom: 30px;
font-weight: 600;
color: #000;
max-width: 500px;
list-style: none;
padding-left: 30px;
padding-right: 0px;
}
#landing1 .f button.btn.btn-default.btn-xl.btn.btn-default.product-btn.bold {
margin-top: 6px;
}
@media only screen and (max-width: 767.98px) {
#landing1 .f ul li {
padding-left: 10px;
padding-right: 0px;
}
}
.diet {
margin-top: 20px;
}
.formmargin{
margin-top: 12px;
}
{# .diet:hover {
transform: scale(1.1); #}
}
.dietcontent {
float: right;
}
p {
font-family: 'sf-ui-display-light';
}
</style>
{{ content_top }}
<section id="landing1" class="content" style="background-color:white;">
<div class="container-fluid ">
<div class="row">
<div class="col-md-12 col-xs-12 text-center">
<h1 class=""><b>Apply For The Job!</b></h1>
</div>
</div>
<div class="row">
<div>
<div class="col-md-6 col-md-offset-1 col-sm-12 col-xs-12">
<!-- <img src="https://www.instadiet.in/image/detention.jpg" alt="Pineapple" class="diet img-responsive"> -->
<p><strong>Job Role:</strong></p>
<ul>
<li>The Production Engineer (PE) is responsibile or managing, monitoring, and configuring the applications on staging and production systems.</li>
<li>should be able modify scripts,worked on python scripting OR Hands on coding experience in python</li>
<li>Together with your engineering team, will share an on-call rotation and be an escalation contact for service incidents</li>
<li>Debugs and fix hard problems in live production </li>
<li>Experience in AWS Infrastructure</li>
</ul>
<p><strong>Skills and Qualification:</strong></p>
<ul>
<li>4+ years of industry or open source experience.</li>
<li>Worked collaboratively on a software development team</li>
</ul>
<p><strong>Look forward to::</strong></p>
<ul>
<li>Working with a world-class team. </li>
<li>Fun & work at the same place with an amazing work culture and flexible timings.</li>
<li>Get ready to transform yourself into a health junkie</li>
</ul>
<!-- <h2 class="text-center"><span style="font-size: 16px;">Ms. Mili Sethi, Head of Nutrition and Dietetics</span></h2>
<p class="text-light text-center" style="font-size: 12px; ">She holds a Postgraduate Degree in Dietetics and Food Service Management. Has Experience of 20 years in Weight management and Healthcare Industry. She has worked in Hospitals
as a Clinical Nutritionist Planning Therapeutic Diets for patients as well as Balanced Diet for Weight loss.</p> -->
</div>
<div class="col-md-3 col-md-offset-1 col-sm-12 col-xs-12" id="appoint">
<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal formmargin">
<div class="form-group">
<div class="col-md-12 col-sm-12 mb-s">
<!-- <i class="fa fa-user icon"></i> -->
<label for="">
<h6><b>Name*</b></h6>
</label>
<input required="" type="text" name="name" value="" id="input-name" class="form-control border bold">
<p id="namecheck"></p>
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 mb-s">
<label for="">
<h6><b>Email*</b></h6>
</label>
<!-- <i class="fa fa-envelope icon"></i> -->
<input required="" type="text" name="email" value="" id="input_email" class="form-control border bold">
<p id="emailcheck"></p>
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 mb-s">
<label for="">
<h6><b>Phone*</b></h6>
</label>
<!-- <i class="fa fa-phone icon"></i> -->
<input required="" type="text" name="telephone" value="" id="input_phone" class="form-control border bold">
<p id="phonecheck"></p>
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-xs-12 mb-s">
<label for="">
<h6><b>Post</b></h6>
</label>
<select required="" type="text" name="post_applied" value="" id="input-job" class="form-control border bold">
<option selected value="">Select Post</option>
<option value="1">iOS Devoloper</option>
<option value="2">Php Devoloper</option>
<option value="3">Android Devoloper</option>
<option value="4">Software Tester</option>
<option value="5">Web Designer</option>
<option value="6">Head Of Operations</option>
<option value="7">Marketing Manager</option>
<option value="8">Marketing Analyst</option>
<option value="9">Jr. Graphic Designer</option>
<option value="10">UI/UX Designer</option>
<option value="11">IT and Sales Recruiter</option>
</select>
<p id="postcheck"></p>
</div>
</div>
<!--<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-6 mb-s">
<label for="">
<h6><b>Age(Yrs)*</b></h6>
</label>
<input required="" type="number" min="0" name="age" value="" id="input_age" class="form-control border bold">
<p id="agecheck"></p>
</div>
</div> -->
<div class="form-group">
<div class="col-md-12 col-sm-12 mb-s">
<label for="">
<h6><b>Resume*</b></h6>
</label>
<button type="button" id="button-upload" data-loading-text="Uploading.." class="btn btn-default btn-block"><i class="fa fa-upload"></i> </button>
<input type="hidden" name="file" value="" id="file"/>
<p id="msgcheck"></p>
</div>
</div>
<div class="form-group text-center">
<div class="col-md-12 col-sm-12">
<input type="hidden" name="subject" value="Job Application">
<input type="hidden" name="redirect" value="job-application" >
<input type="hidden" name="enquiry" value="job-application" >
{% if success %}
<div class="valid col-sm-12" id="close-btn1"><div class="success_inline alert alert-success">{{ success }}<button type="button" class="close" data-dismiss="alert">×</button></div></div>
{% endif %}
<button type="submit" id="scrollbtn" class="btn btn-xl btn btn-default bold " value="Submit">Submit</button>
</div>
</div>
</form>
</div>
</div>
<!--end of both section -->
</div>
</div>
</section>
<script>
$(document).ready(function () {
$('#namecheck').hide();
$('#emailcheck').hide();
$('#phonecheck').hide();
// $('#msgcheck').hide();
// $('#agecheck').hide();
$('#postcheck').hide();
var user_err = true;
var email_err = true;
var phone_err = true;
//var msg_err = true;
//var age_err = true;
var job_err = true;
$('#scrollbtn').click(function () {
var user_err = true;
var email_err = true;
var phone_err = true;
//var msg_err = true;
// var age_err = true;
var job_err = true;
name_check();
email_check();
telephone_check();
// msg_check();
//age_check();
job_check();
function name_check() {
var user_val = $('#input-name').val();
if (user_val.length == '') {
$('#namecheck').show();
$('#namecheck').html("*Please Enter Your Name");
$('#namecheck').focus();
$('#namecheck').css({"color":"red" , "font-size": "10px"});
user_err = false;
return false;
}
else if ((user_val.length < 3) || (user_val.length > 32 )){
$('#namecheck').show();
$('#namecheck').html("*Name must be between 3 and 32 characters!");
$('#namecheck').focus();
$('#namecheck').css({"color":"red", "font-size": "10px"});
user_err = false;
return false;
}
else {
$('#namecheck').hide();
}
}
function email_check() {
var email_val = $('#input_email').val();
var regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (regex.test(email_val)) {
$('#emailcheck').hide();
email_err = true;
return true;
}
else if (email_val.length == ''){
$('#emailcheck').show();
$('#emailcheck').html("*Please enter email address!");
$('#emailcheck').focus();
$('#emailcheck').css({"color":"red", "font-size": "10px"});
email_err = false;
return false;
}
else {
$('#emailcheck').show();
$('#emailcheck').html("*Please enter valid email characters!");
$('#emailcheck').focus();
$('#emailcheck').css({"color":"red", "font-size": "10px"});
email_err = false;
return false;
}
}
function telephone_check (){
var phone_val = $('#input_phone').val();
var phoneno = /[0-9]{10}/;
if (phoneno.test(phone_val)){
$('#phonecheck').hide();
phone_err = true;
return true;
}
else if(phone_val.length == " ") {
$('#phonecheck').show();
$('#phonecheck').html("*Phone no must be valid!");
$('#phonecheck').focus();
$('#phonecheck').css({"color":"red", "font-size": "10px"});
phone_err = false;
return false;
}
else {
$('#phonecheck').show();
$('#phonecheck').html("*Please enter valid phone number!");
$('#phonecheck').focus();
$('#phonecheck').css({"color":"red", "font-size": "10px"});
phone_err = false;
return false;
}
}
function job_check() {
var job_val = $('#input-job').val();
// alert(email_val);
if (job_val.length == '') {
$('#postcheck').show();
$('#postcheck').html("*Required ");
$('#postcheck').focus();
$('#postcheck').css({"color":"red", "font-size": "10px"});
job_err = false;
return false;
}
// else if ((gender_val.length < 10) || (msg_val.length > 3000)) {
// $('#gendercheck').show();
// $('#gendercheck').html("*Enquiry must be between 10 and 3000 characters!");
// $('#gendercheck').focus();
// $('#gendercheck').css({"color":"red"});
// gender_err = false;
// return false;
// }
else {
$('#postcheck').hide();
}
}
if ((user_err == true) && (email_err == true) && (phone_err == true) && (job_err == true)) {
return true;
} else {
return false;
}
});
});
</script>
<script>
$('button[id^=\'button-upload\']').on('click', function() {
var node = this;
$('#form-upload').remove();
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
$('#form-upload input[name=\'file\']').trigger('click');
timer = setInterval(function() {
if ($('#form-upload input[name=\'file\']').val() != '') {
clearInterval(timer);
$.ajax({
url: 'index.php?route=tool/upload',
type: 'post',
dataType: 'json',
data: new FormData($('#form-upload')[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button('loading');
},
complete: function() {
$(node).button('reset');
},
success: function(json) {
$('.text-danger').remove();
if (json['error']) {
$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
}
if (json['success']) {
alert(json['success']);
$(node).parent().find('input').attr('value', json['code']);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
}, 500);
});
</script>
{{ footer }}
Job_Application Controller file content
<?php
class ControllerInformationJobApplication extends Controller {
public function index() {
//$this->load->language('information/tracking');
$this->document->setTitle("Job Application");
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
if(empty($this->session->data['success'])){
$data['success']='0';
}else{
$data['success']=$this->session->data['success'];
}
$details=$this->load->controller('common/location');
$data['countryCode']=$details->countryCode;
$data['region']=$details->region;
$data['city']=$details->city;
$data['action'] = $this->url->link('information/contact', '', true);
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer1');
$data['header'] =$this->load->controller('common/header1');
$this->response->setOutput($this->load->view('information/job_application', $data));
}
}
Update information/contact controller
<?php
class ControllerInformationContact extends Controller {
private $error = array();
private $post_applied=array("1"=>"iOS Devoloper","2"=>"Php Devoloper","3"=>"Android Devoloper","4"=>"Software Tester","5"=>"Web Designer","6"=>"Head Of Operations","7"=>"Marketing Manager","8"=>"Marketing Analyst","9"=>"Jr. Graphic Designer","10"=>"UI/UX Designer","11"=>"IT and Sales Recruiter");
public function index() {
$this->load->language('information/contact');
$this->document->setTitle($this->language->get('heading_title'));
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$mail = new Mail($this->config->get('config_mail_engine'));
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
//$mail->setTo($this->config->get('config_email'));
$mail->setTo('ankit@instadiet.in');
$mail->setFrom($this->config->get('config_email'));
$mail->setReplyTo($this->request->post['email']);
$mail->setSender(html_entity_decode($this->request->post['name'], ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode(sprintf($this->request->post['subject'], $this->request->post['name']), ENT_QUOTES, 'UTF-8'));//$this->language->get('email_subject')
$telephone='';
if(isset($this->request->post['telephone'])){
$telephone="Telephone: ".$this->request->post['telephone']."\n";
}
if(isset($this->request->post['post_applied'])){
$telephone.="Post Applied: ".$this->post_applied[$this->request->post['post_applied']]."\n";
}
$mail->setText($telephone.$this->request->post['enquiry']);
if(isset($this->request->post['file']) && $this->request->post['file']){
$this->load->model('tool/upload');
$upload_info = $this->model_tool_upload->getUploadByCode($this->request->post['file']);
$phyname = DIR_UPLOAD.$upload_info['filename'];
$temp_name = DIR_UPLOAD.$upload_info['name'];
copy($phyname,$temp_name);
$mail->AddAttachment($temp_name);
}
$mail->send();
if(isset($temp_name)){
unlink( $temp_name );
}
//$mail->send();
if(isset($this->request->post['redirect']))
{
$redirect=$this->request->post['redirect'];
$this->session->data['success']="Your query has been successfully submitted. one of our InstaDiet executive will contact you shortly.";
//$this->response->redirect($this->url->link($redirect));
$this->response->redirect($redirect);
}else{$this->response->redirect($this->url->link('information/contact/success'));}
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('information/contact')
);
if (isset($this->error['name'])) {
$data['error_name'] = $this->error['name'];
} else {
$data['error_name'] = '';
}
if (isset($this->error['email'])) {
$data['error_email'] = $this->error['email'];
} else {
$data['error_email'] = '';
}
if (isset($this->error['enquiry'])) {
$data['error_enquiry'] = $this->error['enquiry'];
} else {
$data['error_enquiry'] = '';
}
$data['button_submit'] = $this->language->get('button_submit');
$data['action'] = $this->url->link('information/contact', '', true);
$this->load->model('tool/image');
if ($this->config->get('config_image')) {
$data['image'] = $this->model_tool_image->resize($this->config->get('config_image'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_location_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_location_height'));
} else {
$data['image'] = false;
}
$data['store'] = $this->config->get('config_name');
$data['address'] = nl2br($this->config->get('config_address'));
$data['geocode'] = $this->config->get('config_geocode');
$data['geocode_hl'] = $this->config->get('config_language');
$data['telephone'] = $this->config->get('config_telephone');
$data['fax'] = $this->config->get('config_fax');
$data['open'] = nl2br($this->config->get('config_open'));
$data['comment'] = $this->config->get('config_comment');
$data['locations'] = array();
$this->load->model('localisation/location');
foreach((array)$this->config->get('config_location') as $location_id) {
$location_info = $this->model_localisation_location->getLocation($location_id);
if ($location_info) {
if ($location_info['image']) {
$image = $this->model_tool_image->resize($location_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_location_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_location_height'));
} else {
$image = false;
}
$data['locations'][] = array(
'location_id' => $location_info['location_id'],
'name' => $location_info['name'],
'address' => nl2br($location_info['address']),
'geocode' => $location_info['geocode'],
'telephone' => $location_info['telephone'],
'fax' => $location_info['fax'],
'image' => $image,
'open' => nl2br($location_info['open']),
'comment' => $location_info['comment']
);
}
}
if (isset($this->request->post['name'])) {
$data['name'] = $this->request->post['name'];
} else {
$data['name'] = $this->customer->getFirstName();
}
if (isset($this->request->post['email'])) {
$data['email'] = $this->request->post['email'];
} else {
$data['email'] = $this->customer->getEmail();
}
if (isset($this->request->post['enquiry'])) {
$data['enquiry'] = $this->request->post['enquiry'];
} else {
$data['enquiry'] = '';
}
if(!isset($this->request->post['telephone'])){
// Captcha
if ($this->config->get('captcha_' . $this->config->get('config_captcha') . '_status') && in_array('contact', (array)$this->config->get('config_captcha_page'))) {
$data['captcha'] = $this->load->controller('extension/captcha/' . $this->config->get('config_captcha'), $this->error);
} else {
$data['captcha'] = '';
}
}
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer1');
$data['header'] = $this->load->controller('common/header1');
$this->response->setOutput($this->load->view('information/contact', $data));
}
protected function validate() {
if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 32)) {
$this->error['name'] = $this->language->get('error_name');
}
if (isset($this->request->post['telephone']) && ((utf8_strlen($this->request->post['telephone']) < 10) || (utf8_strlen($this->request->post['telephone']) > 13))) {
$json['error']['telephone'] = "Valid mobile required";
}
if (!filter_var($this->request->post['email'], FILTER_VALIDATE_EMAIL)) {
$this->error['email'] = $this->language->get('error_email');
}
if ((utf8_strlen($this->request->post['enquiry']) < 10) || (utf8_strlen($this->request->post['enquiry']) > 3000)) {
$this->error['enquiry'] = $this->language->get('error_enquiry');
}
if(!isset($this->request->post['telephone'])){
// Captcha
if ($this->config->get('captcha_' . $this->config->get('config_captcha') . '_status') && in_array('contact', (array)$this->config->get('config_captcha_page'))) {
$captcha = $this->load->controller('extension/captcha/' . $this->config->get('config_captcha') . '/validate');
if ($captcha) {
$this->error['captcha'] = $captcha;
}
}
}
return !$this->error;
}
public function success() {
$this->load->language('information/contact');
$this->document->setTitle($this->language->get('heading_title'));
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('information/contact')
);
$data['heading_title']="Enquiry Submitted";
$data['text_message']=$this->language->get('text_success');
$data['continue'] = $this->url->link('common/home');
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = "";//$this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer1');
$data['header'] = $this->load->controller('common/header1');
$this->response->setOutput($this->load->view('common/success', $data));
}
}
March 3, 2021 in E-Commerce, Only Happened In India, Php, Technology, Tips and Tricks
We detected event code but the pixel has not activated for this event, so no information was sent to Facebook. This could be due to an error in the code, but could also occur if the pixel fires on a dynamic event such as a button click
The Pixel Helper is a Chrome Browser extension that runs in the background to automatically review websites for Facebook Pixel code. When the extension is installed a </> icon, the Pixel Helper icon, will appear in the upper right corner of the browser next to the address bar. When a website has a Facebook Pixel installed the Pixel Helper icon turns blue and a small badge will appear indicating the number of pixels found on the webpage. If the icon does not turn blue, no Facebook pixels are installed on this webpage. Click the Pixel Helper icon and a small popup appears with information you can use to verify, troubleshoot, and improve our pixel.
To use the Facebook Pixel Helper you must:
Navigate to your website in the Chrome browser, and click on the Pixel Helper icon. The popup will tell what pixels were found on the webpage, and whether they have loaded successfully.
The Facebook Pixel Helper reports errors and suggestions to improve performance.
This section shows if data processing parameters are being sent with the Limited Data Use flag. DPOST and DPOCO will show 1, 1000 if it is sent with California/USA data.
source:https://developers.facebook.com/docs/facebook-pixel/support/pixel-helper#did-not-load
February 23, 2021 in Only Happened In India, Php, Technology, Tips and Tricks
To test the code I wrote for the blog post, I used PHP’s built-in web server (available in PHP 5.4 and later) to serve the code locally. I used another tool called ngrok to expose the locally running PHP server to the public internet. Ngrok does this by creating a tunnel to a specified port on your local machine.
You can use PHP’s built-in web server and ngrok on Windows, Linux, and Mac OS X. If you have PHP 5.4+ installed, then the built-in server is ready to use. To install ngrok, use the simple instructions on the ngrok website. I work primarily in OS X, so you may need to modify the commands I use in the rest of this post if you are using another platform.
First, you’ll need the PHP code that will handle the incoming messages. My post about receiving SNS messages provides a complete code example for doing this.
Let’s create a new folder in your home directly to use for this test. We’ll also install Composer, the AWS SDK for PHP, create a directory for the webroot, and create files for the PHP code and a log.
mkdir ~/sns-message-test && cd ~/sns-message-test curl -sS https://getcomposer.org/installer | php php composer.phar require aws/aws-sdk-php:~2.6.0 touch messages.log mkdir web && touch web/index.php
Now take the PHP code from the other blog post and put it in index.php. Here is that same code, but with the require statement needed to load the SDK with our current file structure. I am also going to update the code to log the incoming messages to a file so we can easily see that the messages are being handled correctly.
<?php
require __DIR__ . '/../vendor/autoload.php';
use AwsSnsMessageValidatorMessage;
use AwsSnsMessageValidatorMessageValidator;
use GuzzleHttpClient;
// Make sure the request is POST
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
http_response_code(405);
die;
}
try {
// Create a message from the post data and validate its signature
$message = Message::fromRawPostData();
$validator = new MessageValidator();
$validator->validate($message);
} catch (Exception $e) {
// Pretend we're not here if the message is invalid
http_response_code(404);
die;
}
if ($message->get('Type') === 'SubscriptionConfirmation') {
// Send a request to the SubscribeURL to complete subscription
(new Client)->get($message->get('SubscribeURL'))->send();
}
// Log the message
$file = new SplFileObject(__DIR__ . '/../messages.log', 'a');
$file->fwrite($message->get('Type') . ': ' . $message->get('Message') . "n");
Before you can perform any tests, you must set up an Amazon SNS topic. You can do this easily in the AWS Management Console by following the Getting Started with Amazon Simple Notification Service guide. This guide also shows how to subscribe to a topic and publish a message, which you will also need to do in a moment.
OK, we have an Amazon SNS topic ready and all of the files we need in place. Now we need to start up the server and make it accessible to Amazon SNS. To do this, create 3 separate terminal windows or tabs, which we will use for 3 separate long-running processes: the server, ngrok, and tailing the messages log.
In the first terminal window, use the following command to start up the PHP built-in web server to serve our little test webhook. (Note: you can use a different port number, just make sure you use the same one with ngrok.)
php -S 127.0.0.1:8000 -t web/
This will create some output that looks something like the following:
PHP 5.4.24 Development Server started at Mon Mar 31 11:02:14 2014 Listening on http://127.0.0.1:8000 Document root is /Users/your-user/sns-message-test/web Press Ctrl-C to quit.
If you access http://127.0.0.1:8000 from your web browser, you will likely see a blank page, but that request will show up in this terminal window. Since our code is set up to respond only to POST requests, we will see the expected behavior of a 405 HTTP code in the response.
[Mon Mar 31 11:02:44 2014] 127.0.0.1:61409 [405]: /
In the second terminal window, use the following command to create an ngrok tunnel to the PHP server. Use the same port as you did in the previous section.
ngrok 8000
That was easy! The output of this command will contain a publicly accessible URL that forwards to your localhost.
Tunnel Status online Version 1.6/1.5 Forwarding http://58565ed9.ngrok.com -> 127.0.0.1:8000 Forwarding https://58565ed9.ngrok.com -> 127.0.0.1:8000 Web Interface 127.0.0.1:4040 # Conn 1 Avg Conn Time 36.06ms
ngrok also provides a small web app running on localhost:4040 that displays all of the incoming requests through the tunnel. It also allows you to click a button to replay a request, which is really helpful for testing and debugging your webhooks.
Let’s use the third terminal window to tail the log file that our PHP code writes the incoming messages to.
tail -f messages.log
This won’t show anything yet, but once we start publishing Amazon SNS messages to our topic, they should be printed out in this window.
Now that everything is running and wired up, head back to the Amazon SNS console and subscribe the URL provided by ngrok as an HTTP endpoint for your SNS topic.
If all goes well, you should see output similar to the following on each of the 3 terminal windows.
PHP Server:
[Tue Apr 1 08:51:13 2014] 127.0.0.1:50190 [200]: /
ngrok:
POST / 200 OK
Log:
SubscriptionConfirmation: You have chosen to subscribe to the topic arn:aws:sns:us-west-2:01234567890:sdk-test. To confirm the subscription, visit the SubscribeURL included in this message.
Back in the SNS console, you should see that the subscription has been confirmed. Next, publish a message to the topic to test that normal messages are processed correctly. The output should be similar:
PHP Server:
[Tue Apr 1 10:08:14 2014] 127.0.0.1:51235 [200]: /
ngrok:
POST / 200 OK
Log:
Notification: THIS IS MY TEST MESSAGE!
Nice work!
As well as Amazon Web Services and many more.
February 23, 2021 in Php, Technology, Tips and Tricks
$ipaddress = $_SERVER['REMOTE_ADDR'];
//$ipaddress='203.115.97.180';
//$json = file_get_contents("http://ip-api.com/json");
//$json = file_get_contents("http://ipinfo.io/{$ipaddress}");
//$json = file_get_contents("http://ipinfo.io/{$ipaddress}");
$json = file_get_contents("http://ip-api.com/json/".$ipaddress);
$details = json_decode($json);
$data['countryCode']=$details->countryCode;
$data['region']=$details->region;
$data['city']=$details->city;
February 10, 2021 in MySql, Php, Technology, Tips and Tricks
Add the ondrej/php which has PHP 7.4 package and other required PHP extensions.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Once you have added the PPA you can install PHP 7.4.
Execute the following command to install PHP 7.4
sudo apt install php7.4
Installing PHP extensions are simple with the following syntax.
sudo apt install php7.4-extension_name
Now, install some commonly used php-extensions with the following command.
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
After the installation has completed, you can confirm the installation using the following command
php -v
Now you need to tell Apache to use the installed version of PHP 7.4 by disabling the old PHP module (below I have mentioned php7.0, you need to use your current php version used by Apache) and enabling the new PHP module using the following command.
sudo a2dismod php7.0
sudo a2enmod php7.4
Restart Apache for the changes to take effect.
sudo service apache2 restart