Raised This Month: $51 Target: $400
 12% 

Reading Web Content info ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-20-2022 , 13:16   Reading Web Content info ?
Reply With Quote #1

Hi, I am trying to make a plugin to retrieve from game tracker the "ALL TIME STATS" Info per user .

I've browesd the forum a little and found tons of Modules/INC wich I "suspect" (because i am not sure and i am realy noob at this) this could be made trough them, Sockets, cURL, THREADED HTPP, HTTP:X, HTTP, HTPPX, bla bla and so on, my questionS are :

1. Wich is the easiest/friendly-user to learn and use in my goal?
2. Wich is the fastest ( as i read, some are called after a while, idk wich, is there one wich could make to retrieve the Info almost instantly for the user eyes? I am trying to make an plugin wich when users type /playedtime, will show a menu or an motd with his ALL TIME STATS on gametracker ) .
3. How to actualy done it, please a little support (this if answered to the other two questions ) .

Thanks in advance guys .
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-20-2022 , 21:34   Re: Reading Web Content info ?
Reply With Quote #2

Use curl module, or sockets if you're reading only http requests.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-20-2022 , 21:55   Re: Reading Web Content info ?
Reply With Quote #3

https://github.com/bigdaddy424/alliedmods-scraped-api
There's plenty of tutorials how to scrape data from websites. As long as these websites don't have anti-bot captchas you're safe.
bigdaddy424 is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-21-2022 , 01:11   Re: Reading Web Content info ?
Reply With Quote #4

Nathseh thank ill give a try with curl module, but curl module does require any special instalation or is an module as any others ?

Bigdaddy, the link you provide has no example in it, what about it?
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-21-2022 , 01:24   Re: Reading Web Content info ?
Reply With Quote #5

yes you need to install the module not a big deal its not included in the normal amxmodx package so yes.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-21-2022 , 05:40   Re: Reading Web Content info ?
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
yes you need to install the module not a big deal its not included in the normal amxmodx package so yes.
Lol, no , what i mean is "Beside" the module does require any meta special plugin or somrthing like that? Or i imstall it like any other normal Module?
.i readed the comments from the topic and Prostetamoto said something about an Meta plugin or something like that , i couldnt grasp the conversation because were too much for me .
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-21-2022 , 08:25   Re: Reading Web Content info ?
Reply With Quote #7

No its an amxx module, nothing required.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-21-2022 at 08:25.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-21-2022 , 13:02   Re: Reading Web Content info ?
Reply With Quote #8

Nat. , i readed a little about CURL, but is fucking complicated, are you sure is easier with Curl rather than Sockets ? ( I mean when you have zero knowledeb about subject as me ) .

Anyway .

What exactly does Curl? Please explain in normal terms not programmer terms .

If i use curl to retrieve data from an Gametracker page of an User, could i Read one of more Info from there just by inserting an Key ?

Or the CURL function would downloand an entire page and i have to use Regex to search for my keywords and delete the rest of the content ?

I found this website ( https://reqbin.com/req/c-1n4ljxb9/cu...equest-example )

If i use CURL on gametracker of an player page, would give me an PHP source code ,

Does that mean the Curl module uses getinfo function to download source codes of the http i insert, and i have to use Regex in order to substring my info i need to retrieve ?

I'm sorry but i am really confused about how this module works, and all the info and people were talking about it made it even more confusing because they were talking in PROGRAMMING terms, but i'm not an programmer .
__________________
Project: Among Us

Last edited by Craxor; 04-21-2022 at 13:02.
Craxor is offline
Send a message via ICQ to Craxor
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-21-2022 , 13:34   Re: Reading Web Content info ?
Reply With Quote #9

Sockets only retrieves data using HTTP request while cURL support multiple protocols & requests.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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
Reply



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 05:18.


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