Monthly Archives: March 2017

Dynamic URL for IOS push notification

<?php

if(isset($_POST[‘developemnt’]))
{
$url_detail_data = array(“cert_url”=>mysql_real_escape_string($_POST[‘dev_url’]),”host_url”=>mysql_real_escape_string($_POST[‘dev_host’]));
$query = $con->update(“url_detail”,$url_detail_data,””,”1″);

$to=”admin/index.php?flag=1″;
redirect($to);

}
else if (isset($_POST[‘live’]))
{
$url_detail_data = array(“cert_url”=>mysql_real_escape_string($_POST[‘live_url’]),”host_url”=>mysql_real_escape_string($_POST[‘live_host’]));
$query = $con->update(“url_detail”,$url_detail_data);

$to=”admin/index.php?flag=2″;
redirect($to);
}
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

<link href=”style/css/transdmin.css” rel=”stylesheet” type=”text/css” media=”screen” />
<link href=’http://fonts.googleapis.com/css?family=Open+Sans&#8217; rel=’stylesheet’ type=’text/css’>
http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

</head>

 

<form action=”” class=”jNice” name=”frmindex” method=”post” id=”form_captcha”>
<input type=”hidden” name=”dev_url” value=”/admin/certificate/Certificate_APNS.pem”/>
<input type=”hidden” name=”dev_host” value=”‘ssl://gateway.push.apple.com:2195′”/>

<input type=”hidden” name=”live_url” value=”‘/admin/certificate/Certificate_Live_APNS.pem'”/>
<input type=”hidden” name=”live_host” value=”‘ssl://gateway.push.appleLive.com:2195′”/>

<fieldset class=”log_fieldset”>

<input type=”submit” id=”developemnt” class=”button-submit” name=”developemnt” value=”dev” /> &nbsp;&nbsp;&nbsp;
<input type=”submit” id=”live” class=”button-submit” name=”live” value=”live” />
</fieldset>
</form>

</div>

</div>
</body>
</html>

<!–

else if(mode==’push’)
{
$cert_url=’/admin/certificate/Certificate_APNS.pem’;
$host_url=’ssl://gateway.push.apple.com:2195′;

$url_detailQuery = $con->select_query(“url_detail”,”*”,””,””,””);

if($con->total_records($url_detailQuery)>0)
{
$url_data=mysql_fetch_assoc($url_detailQuery);
$apn=array(‘sound’=>’default’);

$deviceToken=”dsdsaldksalfjsdklfdskfjklsdjflkd”;
sendNotificationToIOS($apn,$deviceToken,$url_data[‘cert_url’],$url_data[‘host_url’]);
}
else
{
$url_detail_data = array(“cert_url”=>$cert_url,”host_url”=>$host_url);
$query = $con->insert_record(“url_detail”,$url_detail_data);
}
}
–>

Advertisements
Rajnikant Boghani

The greatest facebook.com site in all the land!

R@j @h!R

Talk is cheap. Show me the code.

butanichatur

A fine WordPress.com site

Azeem Rangara

Top IT Technology Funda

Welcome to Adarsh Patel's Blog

Learning is the Key To Success.

The Daily Post

The Art and Craft of Blogging

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.