Forum

Results 1 to 7 of 7
  1. #1
    Join Date
    October 2015
    Posts
    3

    can't get JSON file with server versions due to cloudflare captcha

    Hello,

    to get the actual server versions I want to use the following JSON file:

    https://teamspeak.com/versions/server.json

    In my browser everything's fine, but unfortunately if I grab it with PHP, cloudflare decline the access and ask to resolve a captcha:

    Code:
    file_get_contents('https://teamspeak.com/versions/server.json');
    result (HTML file, no JSON file as expected):

    Code:
    Please enable cookies.
    One more step
    Please complete the security check to access teamspeak.com
    
    
    Why do I have to complete a CAPTCHA?
    Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.
    What can I do to prevent this in the future?
    If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.
    If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.
    Cloudflare Ray ID: xxxxxxxxxxxxxxxx  Your IP: xxx.xxx.xxx.xxx  Performance & security by Cloudflare 
    I think it's something to configure on the site of teamspeak.com, or am I missing something?


    Thanks and greetings,

    frozn

  2. #2
    Join Date
    March 2018
    Posts
    47
    Provide User Agent in request

  3. #3
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,409
    Thank you for letting us know. I'll forward the info to our IT department.

  4. #4
    Join Date
    October 2015
    Posts
    3
    any update on this?

    tested it again, but cloudflare decline the access furthermore.

  5. #5
    Join Date
    May 2015
    Location
    Brazil
    Posts
    11

    Thumbs up

    If it's in PHP, try curl
    PHP Code:
    <?php
    $url
    ="https://teamspeak.com/versions/server.json";
    $agent'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
    $ch curl_init();
    curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    curl_setopt($chCURLOPT_VERBOSEtrue);
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    curl_setopt($chCURLOPT_USERAGENT$agent);
    curl_setopt($chCURLOPT_URL,$url);
    $resultado=curl_exec($ch);
    $json json_decode($resultado,true);
    print_r($json);
    ?>
    The return is in json.
    I tested and it worked

  6. #6
    Join Date
    November 2017
    Location
    Cologne, Germany
    Posts
    145
    Having an "API" endpoint that is restricted to humans is kinda pointless.

    I'd say what TeamSpeak needs is a new sub-domain like "api.teamspeak.com" or similar and a proper API implementation with rate limits, realtime data and a suitable DDoS mitigation that does not block automated access.

    This JSON file that appears to get updated by hand some time after a new release was published is kinda awkward.

  7. #7
    Join Date
    October 2015
    Posts
    3
    thanks for your example. @iPistachi

    setting a user-agent in my request to simulate a "real user using its browser" works, but I think it's like RandomHost already mentioned:

    this file should generally be accessible by automated access.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: July 11th, 2017, 07:26 AM
  2. [Suggestions] Upgrade versions check from protobuf to JSON
    By VJean in forum Suggestions and Feedback
    Replies: 3
    Last Post: April 17th, 2017, 03:19 PM
  3. [WEBAPI][JSON] Online Game/Voice Server Query Tool
    By xCausxn in forum Tools / Web Based
    Replies: 15
    Last Post: May 19th, 2016, 02:41 PM
  4. Replies: 1
    Last Post: February 12th, 2014, 11:52 AM
  5. Replies: 1
    Last Post: July 12th, 2011, 02:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •