how can get error message from josn?

http://212.76.95.85:8844/CreateHWB.aspx?from=RYD&to=DMM&shipid=1223456789&shipssn=0&shipname=mohamad&shipphone=0112222&shipcity=riyadh&shipaddress=&rcvssn=0&rcvname=toto&rcvphone=00966506268525&rcvcity=riyadh&rcvaddress=riyadh-takhsusi-%D9%81%D8%B1%D9%82190%D8%B1%D9%8A%D8%A7%D9%84%20%D9%8A%D8%AF%D9%81%D8%B9%D9%87%D8%A7%20%D8%A7%D9%84%D8%B9%D9%85%D9%8A%D9%84%20-%D8%B1%D9%82%D9%85%20%D8%A7%D9%84%D8%B7%D9%84%D8%A8%20%D8%A7%D9%84%D8%A7%D9%88%D9%84%2029396%20&pkgdesc=%D9%85%D9%81%D8%B1%D8%B4%20%D8%AA%D8%B1%D9%83%D9%8A%20%D9%81%D9%86%D8%AF%D9%82%D9%89%20White%20-Gray%20&codvalue=485&pcs=1&customerno=110004&weight=15&passcode=TestPassword&refno=32885

Open in new window

Hamdan ShafiqFull Stack PHP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
This expert suggested creating a Gigs project.
This will take a good bit of work to figure out.

Someone will have to get into your CreateHWB.aspx code + determine what's wrong, how to raise exceptions, how best to pass them back to whatever consumers/code that uses this facility.

Likely best to open a Gig for fastest resolution.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
the request returned with a json message:

[["ShipAddress is null"]]

Open in new window


you got to check the documentation what is mean by this json message.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hamdan ShafiqFull Stack PHP DeveloperAuthor Commented:
$url='http://212.76.95.85:8844/CreateHWB.aspx?from=RYD&to=DMM&shipid=1223456789&shipssn=0&shipname=mohamad&shipphone=0112222&shipcity=riyadh&shipaddress=&rcvssn=0&rcvname=toto&rcvphone=00966506268525&rcvcity=riyadh&rcvaddress=riyadh-takhsusi-%D9%81%D8%B1%D9%82190%D8%B1%D9%8A%D8%A7%D9%84%20%D9%8A%D8%AF%D9%81%D8%B9%D9%87%D8%A7%20%D8%A7%D9%84%D8%B9%D9%85%D9%8A%D9%84%20-%D8%B1%D9%82%D9%85%20%D8%A7%D9%84%D8%B7%D9%84%D8%A8%20%D8%A7%D9%84%D8%A7%D9%88%D9%84%2029396%20&pkgdesc=%D9%85%D9%81%D8%B1%D8%B4%20%D8%AA%D8%B1%D9%83%D9%8A%20%D9%81%D9%86%D8%AF%D9%82%D9%89%20White%20-Gray%20&codvalue=485&pcs=1&customerno=110004&weight=15&passcode=TestPassword&refno=32885'
 $ch = curl_init();
  $timeout = 0;
  curl_setopt ($ch, CURLOPT_URL, $url);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

  curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
  curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  $response= curl_exec($ch);
  if (!$response){
           die(curl_error($ch));
  }
  curl_close($ch);
  return $response;

Open in new window

0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
if you mean to return the json content only, then you should try:

...
curl_close($ch);
  
  $ar = json_decode($response);
  $rtn = $ar[0][0];
  
  return $rtn;

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.