Raised This Month: $ Target: $400
 0% 

Reading Web Content info ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-21-2022 , 14:40   Re: Reading Web Content info ?
Reply With Quote #10

Do not use sockets for that purpose, stick with curl.
https://github.com/Next21Team/AmxxCurl

I won't go in-depth about the differences but with sockets, if you do multiple requests within a short interval of time, you may receive the response all at once instead of in pieces for each request, you wouldn't know which request the response belongs to. You don't have this problem with curl, all you really need is to send the request, once curl receives the response, it will trigger the callback.

Curl is pretty simple, there is plenty of information on google, just search.
There is even a couple of examples of how to use AmxxCurl module, https://github.com/Next21Team/AmxxCu...r/amx_examples

Now regarding how to get the stats of a player, you won't request the stats page, instead, you have to request the gametracker API, it will return either an XML or a JSON response containing all the information of the specified player.

Alternatively, you could just show a motd pointing to the player stats page.
__________________








CrazY. is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode