LegitSpiderman Posted July 3, 2019 Share Posted July 3, 2019 (edited) Hey people of php freaks recently, I've been having issues changing a discord webhook [curl] post request to a website [curl] post request. My knowledge in PHP is very limited so, I really would appreciate some help This is the function: function postToDiscord($message) { $data = array("content" => $message, "username" => "Payouts Bot"); $curl = curl_init("https://discordapp.com/api/webhooks/591662537293168650/eyme87xmCuKne4njucoDSqzojq78NaS9x7t4sgP9m-l5EmrvUeZegkM4wok-L-UdBDxo"); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); return curl_exec($curl); } Currently the discord bot transfers the message into a discord channel and, I do not want that. I want it to transfer it onto a website page. As, I said i'm not very keen on this so please help me. Edited July 3, 2019 by LegitSpiderman Quote Link to comment Share on other sites More sharing options...
requinix Posted July 3, 2019 Share Posted July 3, 2019 Either I'm misunderstanding or you're talking about completely changing what this process does. And while you may not know PHP, you still have two options here: we help do you the work (which will require you to learn some PHP) or you find someone who'll do it for you (and it won't be free). Assuming the former, What website are you talking about? Send what data that was presumably combined into $message? Quote Link to comment Share on other sites More sharing options...
LegitSpiderman Posted July 3, 2019 Author Share Posted July 3, 2019 (edited) 8 minutes ago, requinix said: Either I'm misunderstanding or you're talking about completely changing what this process does. And while you may not know PHP, you still have two options here: we help do you the work (which will require you to learn some PHP) or you find someone who'll do it for you (and it won't be free). Assuming the former, What website are you talking about? Send what data that was presumably combined into $message? It's for a offerwall website, which calculates the profit they made from completing offers, so it updates their points and it sends the payout message via a bot into that discord channel. All, I want is somebody to do the same thing. But make it send the message onto a web page via the same method. So, I'd need somebody to convert this into a website method. Edited July 3, 2019 by LegitSpiderman Quote Link to comment Share on other sites More sharing options...
ginerjm Posted July 3, 2019 Share Posted July 3, 2019 offerwall website? send the message onto a web page? website method? What are these terms? Strange language! Quote Link to comment Share on other sites More sharing options...
LegitSpiderman Posted July 3, 2019 Author Share Posted July 3, 2019 1 minute ago, ginerjm said: offerwall website? send the message onto a web page? website method? What are these terms? Strange language! Haha, I don't have terms for them, but you could atleast understand the core topic is to make it post to a page not into a discord chat. Eh, i guess ill just learn php or get somebody to change it for me. Quote Link to comment Share on other sites More sharing options...
requinix Posted July 3, 2019 Share Posted July 3, 2019 Yeah, this is not something that a couple posts on a forum is going to solve. You're talking about integrating with some website's API. There's documentation to read, instructions to follow, possibly a developer account or API key to obtain... We can still help but you're going to have to do a fair bit of work even to get the ball rolling here. The first question you need to answer is what, technically speaking though not in terms of literal PHP code, is what your site needs to do. What data goes where and how. Translating that into PHP comes after. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.