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 8875527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:59:42+00:00 2026-06-14T18:59:42+00:00

I am using CURL to generate data. Though the site is not providing any

  • 0

I am using CURL to generate data. Though the site is not providing any other format for extraction So what I have did simply paas the url and retrieving data in HTML this is my script is retrievning. Can I convert that html data to any other format like JSON or XML so it would easy for me to parse HTML in PHP. If I can’t get data in JSON/XL how would I extract data that is parse it according to my relevance. I got some code to get it in json.

function get_json_content($json_url = '') {
    $ch = curl_init($json_url);
    $options = array(
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => array('Content-type: application/json'),
        CURLOPT_TIMEOUT => 160,
        CURLOPT_FOLLOWLOCATION => 1
    );

    curl_setopt_array($ch, $options);               // Setting curl options
    $result = curl_exec($ch);                       // Getting jSON result string
    return $result;
}

$json_url = 'http://www.evertek.com/viewpart.asp?auto=78053&cat=45#.UKZWHme5JI4';
$get_result = get_json_content($json_url);
die($get_result);

This $get_result is receving in html. Please help me my motto is to extract or parse data in proper format no matter wheresoever format it is in. I just want to easily parse data so I can use it with PHP.

  • 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-14T18:59:43+00:00Added an answer on June 14, 2026 at 6:59 pm

    You can only use what CURL is giving you back, and CURL can only get what it’s given – in this case, HTML.

    HTML isn’t difficult to work with, take a look at the answers here: How do you parse and process HTML/XML in PHP?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I using curl to post data to another server, between each posting I use
I am using curl library which returns data to me through a callback function
passing post data using cURL requires that the name of the input. However, I
I'm using Curl library to simulate multipart-form-data submission, then I noticed that I need
I have a bash function that fetches values (using curl and cut) and creates
Am using PHP curl to do SOAP requests to a webservice, I have an
Using cURL I can send a GET request with a body. Example: curl -i
Im using curl to fetch my Twitter favorites: <?php $username = bob; $password =
i am using curl in my program. and my code is : $tref =
I tried using curl syntax: curl http:// localhost:8983/solr/update/csv?stream.file=/usr/local/src/apache-solr-3.6.0/example/exampledocs/my+file.csv&separator=;&stream.contentType=text/plain;charset=utf-8 with no luck. I get: -bash:

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.