skip to Main Content

When making a GET request through PHP to https://comeback.pw/cats/146x?page=1, I receive a different HTML response, whereas everything works fine in a regular browser. What could be the issue?

It seems like there’s JavaScript content protection in place. Is it possible to bypass it? When I copy a cURL request from Chrome and import it into Postman, it returns the CORRECT data. However, if I execute the same request in Postman again, I receive a different response. What might be causing this behavior?

2

Answers


  1. I test with a simple curl like this and it seems to be fine.

    <?php
    
    $url = "https://comeback.pw/cats/146x?page=1";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_REFERER, 'https://google.com');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_URL, $url);
    $response = curl_exec($ch);
    curl_close($ch);
    
    print_r($response);
    
    ?>
    
    Login or Signup to reply.
  2. I receive a different HTML response, whereas everything works fine in
    a regular browser. What could be the issue?

    That page has JavaScript which after execution does change content of said page. GNU wget does not support JavaScript execution. You need tool which does. I would suggest taking look at PhantomJS though I am not sure if it is not verboten as etc part of title of your question.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search