Rocket Scientist Posted January 12, 2017 Report Posted January 12, 2017 Hello, Guys! I have a few questions. What is difference between this urls? 1. https://steamcommunity.com/mobileconf/conf?p= 2. https://steamcommunity.com/mobileconf/ajaxop?op=How i understood to confirm some trade i need to use https://steamcommunity.com/mobileconf/ajaxop?op=Now i have this code: Parameters: $identity_secret = 'J**************************g=';$time = time();$tag = 'conf';// ---------> base64 confirmation key $buf = pack('NNa*', 0, $time, $tag); $hmac = hash_hmac('sha1', $buf, $identity_secret, true); $k = base64_encode($hmac);// ^--------- base64 confirmation key $steamid = '76561198252188406';$deviceid = 'android:' . preg_replace('/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12}).*$/', '$1-$2-$3-$4-$5', sha1($steamid)); And create final url for post request:$url = 'https://steamcommunity.com/mobileconf/ajaxop?op=allow&p='.$deviceid.'&a='.$steamid.'&k='.$k.'&t='.$time.'&m=android&tag=conf';But i get this: "{"success":false}" That is the problem? Maybe i need some more parapeters or i generate something not right? Rocket Scientist 1 Quote
Dr. McKay Posted January 12, 2017 Report Posted January 12, 2017 Are you logged in? You need to be logged in to use that. Quote
Rocket Scientist Posted January 13, 2017 Author Report Posted January 13, 2017 Oh, no...Can you explain how to make this please? Quote
Dr. McKay Posted January 13, 2017 Report Posted January 13, 2017 I have never attempted to sign into Steam from PHP. I believe there might be libraries out there that do it, but I can't help you there. Quote
Rocket Scientist Posted January 14, 2017 Author Report Posted January 14, 2017 For example. Always then i accepts trades i use this url https://steamcommunity.com/tradeoffer/'. $tradeID . '/accept and i'm sends my cookies and sessionid for login like this $data = array( 'sessionid' => $sessionId);$cookies = "....";curl_setopt($c, CURLOPT_COOKIE, $cookies);curl_setopt($c, CURLOPT_POSTFIELDS, http_build_query($data)); Do you mean that i need to make me login also in steamcommunity.com? If i it's right what do i need to send? Login, password, steamguardcode and something else? Quote
Dr. McKay Posted January 15, 2017 Report Posted January 15, 2017 Your cookies need to be valid, of course. You also need to send more data when accepting a trade offer. For example, you need to include the offer ID in the POST fields, along with some other stuff. Quote
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.
Note: Your post will require moderator approval before it will be visible.