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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:17:52+00:00 2026-06-12T09:17:52+00:00

Few days before I created a cronjob script in core php for fetching contents

  • 0

Few days before I created a cronjob script in core php for fetching contents from other server with soap API and inserting the result in to my own database.

Previously it was working fine and fetching around 10000 records and inserting them in to database.

But now the script dosen’t work properly. So I executed the script in browser(Mozila) and it gives me this error.

Content Encoding Error:
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Please
contact the web site owners to inform them of this problem.

I changed the page encoding and few ini related settings but it still showing the same error.

I also changed my code and using below code but the problem is still there.

class API 
{
protected $developerKey;        
protected $websiteId;

// Intialise all the values
public function __construct(){

    $this->developerKey = 'XXXXXXX';
    $this->websiteId    = "yyyyyy";
}

public function apiCall($storeId,$start)
{
    try
    {
        $url    = "https://linksearch.api.cj.com/v2/link-search?";  
        $url    .="website-id=".$this->websiteId;
        $url    .="&advertiser-ids=".$storeId;
        $url    .="&link-type=".urlencode('Text Link');
        $url    .="&page-number=".$start;
        $url    .="&records-per-page=100";

        $ch     = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, FALSE);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: '.$this->developerKey));
        $curl_results = curl_exec($ch);

        $xml    = simplexml_load_string($curl_results);
        $json   = json_encode($xml);
        $arrres = json_decode($json,TRUE);

        return $arrres;
    }
    catch (Exception $e)
    {
        return $e->getMessage();
    }
}
}

I am using apiCall method in a loop for around 600 stores.
Please suggest any solution.

  • 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-12T09:17:53+00:00Added an answer on June 12, 2026 at 9:17 am

    Basically, content encoding error means the response was corrupted in some way, so it couldn’t be rendered. IT could’ve been issue with just one browser, but since you’re getting this with curl:

    HTTP/1.0 500 Internal Server Error

    it means that this is no browser issue, something has gone awry on the server side. You need server logs, especially error logs, to diagnoze this further. Something has happened on the server side, but the information presented doesn’t even hint as to what would that be.

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

Sidebar

Related Questions

I found about this PHP Extension before few days. Can anyone explain me how
A few days ago I set up a small development server. Running on Windows
A few days back, while the built-in server (Tomcat v5.5) in eclipse was running,
I have since few days an issue I never had before. When I want
I have a vanilla forum based forum website. Currently customizing it. Before few days
As I explained in my post a few days before I'm programming an ASP
I posted about this before to a degree, but after a few days of
few days before when i was trying to run my apps the following type
I have for a few days reading this and other tutorials about javax.crypto Using
Few days back I put a question regarding mapping two classes Message and MessageStatusHistory

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.