Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751

    Question How a query an existing web db that is not yours

    Hello everyone I have a question about this particular site Battlelog / Battlefield 4 I'm trying to search for all platoons but there is no search tab.

    here are some sample platoon pages
    Platoons - Battlelog / Battlefield 4
    Platoons - Battlelog / Battlefield 4
    Platoons - Battlelog / Battlefield 4
    Platoons - Battlelog / Battlefield 4
    Platoons - Battlelog / Battlefield 4


    Code:
    http://battlelog.battlefield.com/bf4/platoons/view/6494659757437290882/
    http://battlelog.battlefield.com/bf4/platoons/view/3195216897284682338/
    http://battlelog.battlefield.com/bf4/platoons/view/6894134596136461387/
    http://battlelog.battlefield.com/bf4/platoons/view/711680590741458819/
    http://battlelog.battlefield.com/bf4/platoons/view/8797701470647339653/
    Is there a way to format my own search page that will list all working pages?
    Something like what Battlefield Tracker did?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    The problem will be the login. Even with PHP CURL it might not be possible to get info without generating a login session.

    That other website has probably been given an API with a key to access data ... Probably paying for it?
    Last edited by mlseim; Jun 10th, 2017 at 09:50 PM.


  4. #3
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751
    You can get to the platoon page without logging in.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    They do have an API:
    https://bf4stats.com/api

    There must be more API's, but I don't know enough about this topic to know what to look for.

    You would use PHP to read the JSON data and display on your website.

    Whether it's free or not I don't know.
    They may block your IP if you access data without permission.


  6. #5
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751
    Quote Originally Posted by mlseim View Post
    They do have an API:
    https://bf4stats.com/api
    YES they(bf4stats.com) have an API but they(bf4stats.com) are only the example.
    I do not want any information from them(bf4stats.com)

    Im looking to get the Information from http://battlelog.battlefield.com/bf4/platoons/

    Cant a web page use some form of [if/then] to start from
    battlelog.battlefield.com/bf4/platoons/view/1/ and keep adding to the number
    battlelog.battlefield.com/bf4/platoons/view/2/
    battlelog.battlefield.com/bf4/platoons/view/3/ showing all the urls that resolve to a platoon page and not a "SORRY, THAT PAGE DOESN'T EXIST" page


    http://battlelog.battlefield.com/bf4/platoons/view/6494659757437290882/

    or how about a web scraper
    Last edited by 20GT; Jun 11th, 2017 at 09:08 PM.

  7. #6
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751
    What's next

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    Well, it can't be PHP. Using PHP to attempt to resolve a valid URL by looping, and then scraping it (however hard that will be), would result in a "failed script", based on execution time. No shared webhost is going to allow a script to run for several minutes. The best you could try would be to make your PC an Apache Server w/ your own web server (local webhost), PHP, etc. You could then run your scripts as long as you want. That's something I've never done before.

    And you have contacted these people: Battlelog / Battlefield 4
    And you asked them if they have a way people can access their database?

    I ask that because you have found other people (websites) that display stats for their data. They must have found a way to do it, and it could be through battlelog.battlefield.com in the form of an API.


  9. #8
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751
    Something happened to my post that was before my "what's next" post.

    I swear I posted that they do have an API on Github.

    I'd post the link but I think that why my post got deleted for some reason.

    So instead of posting the link, I'll tell you how I found it. Search Google for

    Github Simple Battlelog API!

    Yes I'll definitely ask for their permission.

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    I'm 56 years old.
    I don't know anything about Battlelog or Battlefield ... I don't know what I'm looking for.
    Not sure what any of it even means.
    It appears like you need to know server ID's.

    You'll have to seek help in a battlelog forum, not here. Sorry


  11. #10
    Member 20GT's Avatar
    Join Date
    Jul 2015
    Posts
    54
    Member #
    50751
    You'll have to seek help in a battlelog forum, not here. Sorry
    I appreciate your responses, and thanks for the replys. Just because you don't know anything about Battlefield doesn't mean that I'm posting in the wrong forum.

    Do you know about API's? I know Battlefield maybe we can figure it out.

    Plus there's a whole forum of knowledgeable people here, all that has to happen is something to peak their interest and they will help when they can, I'm sure.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 11:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com