Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8798669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:08:49+00:00 2026-06-14T00:08:49+00:00

I am attempting to learn cURL to use a JSON web service. I tried

  • 0

I am attempting to learn cURL to use a JSON web service. I tried a couple tutorials online and none seem to be helping.

I want to get to this web address: https://uat.petfirsthealthcare.com/pfh.service.webservices/coreservice.svc/json/GetColorList
and return the results to use in another call. But when I try, I don’t get any thing back.

I used this:

$request = 'https://uat.petfirsthealthcare.com/pfh.service.webservices/coreservice.svc/json/GetColorList';
curl_init($request);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exe($session);
curl_close($session);
echo $response;

When you just go to the URL it return JSON just fine. Thanks for any help you can provide!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:08:50+00:00Added an answer on June 14, 2026 at 12:08 am

    This is TESTED and WORKS!

    <?php
    
    $request = 'https://uat.petfirsthealthcare.com/pfh.service.webservices/coreservice.svc/json/GetColorList';
    $session = curl_init();
    curl_setopt($session, CURLOPT_URL, $request);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_SSLVERSION,3); 
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, FALSE); 
    curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($session, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    $response = curl_exec($session);
    curl_close($session);
    var_dump($response);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to learn Ruby using the new LearnStreet online tutorials. Have attempted to get
I'm attempting to learn how to use Cucumber and creating steps using the following
I'm attempting to learn IronPython, to broaden my .NET horizons. I want to be
I am attempting to learn how to program. I really do want to learn
I am attempting to learn to use RapidMiner, and my boss wants me to
I am attempting to learn Modernizr (or how to use it I should say)
I am attempting to learn Django and Javascript/jQuery for a personal project. I want
So i am attempting to learn some jquery to use in a form to
I'm attempting to learn and use PDO in PHP. I've come across an issue
I have been attempting to learn Grails, however I am running into the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.