Jump to content

WebRequest

Not a Bug 1.2.9

When using the WebRequest (only) option to send data to a web page, can you confirm if you are sending a single $_POST array or a multidimensional array? So far I have not been able to iterate over any posted data and the plugin code doesn't seem to be json encoding any sent data, so I'm assuming I should be able to obtain a value with (e.g.) $theKey = $_POST['secretKey'];

Share this comment


Link to comment
2 hours ago, OneAlpha said:

When using the WebRequest (only) option to send data to a web page, can you confirm if you are sending a single $_POST array or a multidimensional array? So far I have not been able to iterate over any posted data and the plugin code doesn't seem to be json encoding any sent data, so I'm assuming I should be able to obtain a value with (e.g.) $theKey = $_POST['secretKey'];

correct it is not json encoded but you should use $_GET instead of $_POST as it's sending it directly through the URL to the page you enter in the config.

Share this comment


Link to comment

All data is sent in one single url web request:

Example: yoursite.com/file.php?steamid=xxxx&level=xx&experience=xxxx

 

I will send the exact url request after work to give more details on what exactly it's sending

Share this comment


Link to comment

Not a problem, thanks for the help. I'm just checking now to see what is being sent by iterating over the $_GET serverside. I could have used the SQL option but my webserver is on a different IP to the game server and I wanted tailor the webpage to cater for my players needs.

Nice to see SQL supported on a free plugin, so thanks a lot! 

 

Share this comment


Link to comment
7 hours ago, OneAlpha said:

Not a problem, thanks for the help. I'm just checking now to see what is being sent by iterating over the $_GET serverside. I could have used the SQL option but my webserver is on a different IP to the game server and I wanted tailor the webpage to cater for my players needs.

Nice to see SQL supported on a free plugin, so thanks a lot! 

 

I use SQL on remote servers that can be setup as well. They don't have to be on the same server or IP 🙂

Share this comment


Link to comment
On 2/3/2022 at 3:51 AM, OneAlpha said:

When using the WebRequest (only) option to send data to a web page, can you confirm if you are sending a single $_POST array or a multidimensional array? So far I have not been able to iterate over any posted data and the plugin code doesn't seem to be json encoding any sent data, so I'm assuming I should be able to obtain a value with (e.g.) $theKey = $_POST['secretKey'];

Here is the format it's sending, this includes the next version features which are not released yet but will give you time to work with it before this next version is released.

 

                    $"secretKey={config.webrequest.SecretKey}&" +
                    $"steamid={record.id}&" +
                    $"displayname={playername}&" +
                    $"chicken={record.chicken}&" +
                    $"boar={record.boar}&" +
                    $"wolf={record.wolf}&" +
                    $"stag={record.stag}&" +
                    $"bear={record.bear}&" +
                    $"polarbear={record.polarbear}&" +
                    $"shark={record.shark}&" +
                    $"horse={record.horse}&" +
                    $"fish={record.fish}&" +
                    $"scientist={record.scientistnpcnew}&" +
                    $"dweller={record.dweller}&" +
                    $"baseplayer={record.baseplayer}&" +
                    $"lootcontainer={record.lootcontainer}&" +
                    $"underwaterlootcontainer={record.underwaterlootcontainer}&" +
                    $"treescut={record.treescut}&" +
                    $"oremined={record.oremined}&" +
                    $"cactuscut={record.cactuscut}&" +
                    $"woodpickup={record.woodpickup}&" +
                    $"orepickup={record.orepickup}&" +
                    $"berriespickup={record.berriespickup}&" +
                    $"mushroompickup={record.mushroompickup}&" +
                    $"hemppickup={record.hemppickup}&" +
                    $"cornpickup={record.cornpickup}&" +
                    $"seedpickup={record.seedpickup}&" +
                    $"potatopickup={record.potatopickup}&" +
                    $"pumpkinpickup={record.pumpkinpickup}&" +
                    $"bradhelicrate={record.bradhelicrate}&" +
                    $"hackablecrate={record.hackablecrate}&" +
                    $"bradley={record.bradley}&" +
                    $"heli={record.heli}&" +
                    $"animalharvest={record.basecorpse}&" +
                    $"bodiesharvest={record.npcplayercorpse}&" +
                    $"deaths={record.deaths}&" +
                    $"suicides={record.suicides}"

 

  • Like 1

Share this comment


Link to comment
433.7k

Downloads

Total number of downloads.

2.3k

Customers

Total customers served.

32k

Files Sold

Total number of files sold.

519.5k

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.