Azərbaycan dili Bahasa Indonesia Bosanski Català Čeština Dansk Deutsch Eesti English Español Français Galego Hrvatski Italiano Latviešu Lietuvių Magyar Malti Mакедонски Nederlands Norsk Polski Português Português BR Românã Slovenčina Srpski Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Русский Українська Հայերեն ქართული ენა 中文
Subpage under development, new version coming soon!

Asunto: Sokker Tools by Geston

2023-02-22 13:59:13
Geston para juytt
you cant get to junior graph json file from server-side script without beeing authenticated. Only authenticated owner of junior can see that data.

This is why I want to do it at client-side. And I was trying to do if without any "steps", I was thinking at first that I can request json file from client-side js script, but I get authentication error that way aswell. This is normal behavior - sokker server denies access to json files if it comes from any script, doesnt metter it is client-side script from authenticated user browser.

There is a way - probably - using ajax and I will try. If I achieve my goal it will be just two steps: 1. load juniors list, 2. choose junior. Thats all without copy+paste any code and additional tabs.
2023-02-22 16:24:43
the reason why access is denied is that there is no parameter for the team and only from the session they can know for which team you want data

you need a valid PHPSESSID=xxxxxxxxxx to pass it in the header so the only way to get it is to log in..
so you can request whit list your tool so multiple users can login and those that trust you can do the auto check with login
and yes can use ajax to login abd return to next call the session cookie

curl --location -g --request GET 'https://sokker.org/api/junior?filter[limit]=100' \
--header 'Cookie: PHPSESSID=xxxxxx; _html_rtl=0; conf=2158441274; hide_promotion=1; lang=en; lang_ID=2'
2023-02-23 01:10:50
Focusing now on visual side, some changes done:
- talent value on graph
- name and age of junior
- dark background

2023-02-23 06:25:49
test :

2023-02-23 06:26:39
That's what i thought. I did not see the graph on your website, neither after having copied it :
[img ]https://i.imgur.com/EBkNPZf.png[/img]
2023-02-23 08:38:34
Fantastic tool Geston!!! It showed me how bad my youth players are in my academy :p
(editado)
2023-02-23 09:23:39
Your welcome :P
2023-02-23 09:24:25
What did you think?
I know there are some small bugs to fix but in general it works.
(editado)
2023-02-23 11:51:38
Because i did not see the graph on the website at first.
2023-02-23 11:55:46
Any errors when you hit F12 -> console?
2023-02-23 12:04:16
Mikoos para Geston
On Firefox, no graph for me as well

2023-02-23 12:24:10
Geston para Mikoos
Will inestigate it at evening.

Make sure you refreshed files - shift + f5
2023-02-23 12:32:35
Mikoos para Geston
Ctrl + F5, doesn't help :P

Also checked on virtual machine, same problem, a bit different error stack

2023-02-23 12:53:06
I also use Firefox
2023-02-23 12:54:49
Yea i will deal with it later.

That's what I don't like when code is working on one browser but fails on another :x
2023-02-23 12:56:53
No problem, take your time, you are doing great job for community as well as Juytt who had also built a similar tool years ago now for french users.