generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: cURL Help

Previous Thread :: Next Thread 
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
25 Jan 2015 07:35 PM
$id = $_GET["id"];
$gID = $_GET["gID"];
$next = $_GET["next"];
echo "id = $id, gid = $gID, next rank = $next\n";

$username="HIDDENFORSECURITY";
$pas sword="HIDDENFORSECURITY";
$url="https://www.roblox.com/newlogin";
$cookie="cookie.txt";

$postdata = "username=".$username."&pas sword=".$pas sword;

echo $postdata;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);

echo $result;

curl_close($ch);

$cookiestring = "";
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch,CURLOPT_COOKIE, $cookiestring);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Length:0',"X-CSRF-TOKEN:purposelybulltoken", 'Content-type: application/json; charset=utf-8'));
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HEADER, true);

$result = curl_exec($ch);

echo $result;

$tokenstart = strripos($result,"X-CSRF-TOKEN:")+13;
$tokenend = strripos($result,"Set-Cookie");

$csrftoken = substr($result,$tokenstart,$tokenend-$tokenstart);

$url2 = "https://www.roblox.com/groups/api/change-member-rank";
$postData2 = "groupId=".$gID."&newRoleSetId=".$next."&targetUserId=".$id;

echo $postData2;

$cookiestring = "";
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch,CURLOPT_COOKIE, $cookiestring);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Length:0',"X-CSRF-TOKEN:".$csrftoken, 'Content-type: application/json; charset=utf-8'));
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HEADER, true);

$result = curl_exec($ch);

echo $result;
Report Abuse
Crythox is not online. Crythox
Joined: 03 Oct 2011
Total Posts: 1188
25 Jan 2015 07:39 PM
This isn't the place for this..Strange code...
Report Abuse
SuperAlpacaMan is not online. SuperAlpacaMan
Joined: 18 Nov 2008
Total Posts: 774
25 Jan 2015 08:22 PM
This isn't a PHP forum
Why do people think it's a PHP forum
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
25 Jan 2015 08:24 PM
I think I can help.
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
25 Jan 2015 10:51 PM
hex :o
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
25 Jan 2015 10:58 PM
I like how you posted NOTHING useful.

I run a very large PHP-driven web community. I can help. But not when just post crap with no explanation.
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
25 Jan 2015 10:58 PM
It didn't print anything qq, can I also join your community? <3
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
26 Jan 2015 12:20 AM
"This isn't a PHP forum"

Scripters
This is the place for discussion about [s]RBX.Lua[/s] scripting.
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
27 Jan 2015 12:59 PM
b2
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
28 Jan 2015 12:32 PM
It looks like you're using $agent without declaring it, is that the case?
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
29 Jan 2015 08:37 PM
b2
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
30 Jan 2015 05:03 PM
qq
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
30 Jan 2015 05:05 PM
Go ask this on SOF; Not here.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image