Domain based cookie access problem in ionic localhost


#1

i am setting cookie using php and calling other php file in same domain using localhost ionic but that php file not access cookie

Name
loginInfo
Content
752326%5E%7C1%5E%7C1%5E%7C0da1d48927ec9118d271cc6a4f0df3e90ee4d296%5E%7C1
Domain
.agarwal.com
Path
/
Send for
Any kind of connection
Accessible to script
Yes
Created
Monday, October 30, 2017 at 12:19:46 PM
Expires
When the browsing session ends

test.php

<?php
echo $_COOKIE["loginInfo"].'test';
?>

code in ionic - access php file

constructor(public nav: NavController, private http: HttpService) {
    //let body = JSON.stringify({buddylist:1,initialize:1,EnableWebpImage:1,AppType:10});
    let headers = new Headers();    
    headers.append('Content-Type', 'application/json; charset=utf-8');    
    headers.append('Accept', '*/*');    
    /*headers.append("Access-Control-Allow-Credentials", "true");
    headers.append('Upgrade-Insecure-Requests','1');*/
    //headers.append('withCredentials','true');   
    //headers.append("Access-Control-Allow-Origin","http://localhost:8100");
    /*headers.append("Access-Control-Allow-Credentials", "true");*/
    //headers.append("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
    //headers.append("Access-Control-Allow-Headers", "Content-Type,X-Requested-With,Authorization,Orign,Upgrade-Insecure-Requests");
    
    var Url = 'https://www.agarwal.com/cbschat/cbsonlineusers.php';        

    var Shortlist,Contacted,Preferred;   
    var Options = new RequestOptions({params:{buddylist:1,initialize:1,EnableWebpImage:1,AppType:10},headers:headers,withCredentials:true});
    this.http.get(Url, Options).map(res => res.json()).subscribe(
        data =>{
          console.log(data);
        },
        err => {
          console.log(err);
          console.log("Oops!");
        }
    );
    this.items = [
      {
        'title': 'Shortlisted Members',
        'icon': 'contact',
        'description': 'Shortlisted members available to chat',
        'color': '#0CA9EA'
      },
      { 
        'title': 'Contacted Members',
        'icon': 'contacts',
        'description': 'Contacted members available to chat',
        'color': '#F46529'
      },
      {
        'title': 'Preferred Members',
        'icon': 'javascript',
        'description': 'Preferred members available to chat',
        'color': '#FFD439'
      },           
    ]

}