Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 25 Jan 2014 06:33 PM |
http://www.roblox.com/Game/GetCurrentUser.ashx/ This should return the current logged in user, as it does when I visit it on my browser. However, it returns null when I use file_get_contents on it..
Anyone experience this?
-I like signatures.- |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 06:40 PM |
| ever tried file_get_contents_not_null? |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 25 Jan 2014 06:53 PM |
I don't think there's such a thing.
-I like signatures.- |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 25 Jan 2014 06:54 PM |
| Because it's using a cookie to identify you. When you do file_get_contents, you're not sending a cookie. Try using cURL. |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 25 Jan 2014 07:04 PM |
| Thanks, I'm rather new to PHP and your explanation really helped for me to understand more ^_^ |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 25 Jan 2014 07:09 PM |
| No problem. If you need any more help, try looking at php.net's write-up on using cURL, it's helpful. You'll probably want to look at curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); and similar. |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 09:38 PM |
Or try not using PHP. That's my favorite option.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 25 Jan 2014 09:39 PM |
| Or try not replying with useless forum bloat, as you are so prone to do. No one asked your opinion. He asked for help. |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 09:49 PM |
And, as such, is spam. We shouldn't have to help, and in fact we shouldn't help, with these requests.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 25 Jan 2014 09:53 PM |
| I don't really care what the rules are. It's not an excuse to be a useless jerk. |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 09:54 PM |
I gave him proper advice; as a programmer, don't use a language designed for non-programmers. PHP is a horrible language and people shouldn't use it.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
PolyMod
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 4514 |
|
|
| 25 Jan 2014 11:09 PM |
| He's already mentioned the fact he's new PHP, implying he probably doesn't know a bunch of other languages to use. |
|
|
| Report Abuse |
|
|
zbaddude2
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 1897 |
|
|
| 25 Jan 2014 11:41 PM |
@TheLUAWeaver
People shouldn't be using LUA either as a programming language since the are not really a programming language like JAVA(Not script like in unity) or C,C++ or even Visual Basic(And I think I would know since I am pretty fluent in any of these languages. Real programmers do not use Scripting application languages but should really use the real thing(especially if there a computer science major). |
|
|
| Report Abuse |
|
|
zbaddude2
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 1897 |
|
|
| 26 Jan 2014 12:01 AM |
| Please noob, your name is TheLUAWeaver. Obviously if that is your "language" of choice then you have no ground to be saying "As a programmer do not be using PHP it is a horrible language". I would know as I am a real computer scientist who is fluent in multiple languages(C,C++,Java,VB 6,VB.net). I bet you have not touched a real language in your life. Its nothing personal but as a "Programmer" I am giving you the advice of learning to use a real language(I would start with Java or VB as they are the easiest). |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 26 Jan 2014 12:18 AM |
Yeah, the problem with your logic zbad is that he didn't say to use Lua. Plus, if he were to say that, then it would just be swapping out a scripting language for another scripting language. If a language is able to get the job done, and you would rather use that for the task at hand, then there would be no problem using a scripting language. Plus, you are basing an assumption off of his username, which is another major flaw with your logic. One can have 'Lua' in their username and still know other languages. "Please noob, your name is TheLUAWeaver." "I bet you have not touched a real language in your life." |
|
|
| Report Abuse |
|
|
zbaddude2
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 1897 |
|
|
| 26 Jan 2014 12:22 AM |
| Why use a scripting language when you can use a real language like java? in Java you can save your class and then implement it or include it in another program to reuse. PHP and LUA can only be used in there environment and cannot be used to make stand alone applications. |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 26 Jan 2014 12:33 AM |
| Doesn't mean they shouldn't exactly be used. Lua has the advantage of being light weight and is capable of being implemented with ease. Anyways, different people have different preferences. As long as they are capable of solving a problem in a reasonable way with a preferred method, they can't really be wrong. Stop criticizing people for what languages they prefer to use. |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
|
| 26 Jan 2014 12:33 AM |
| Actually, I am proficient in JavaScript and I am attempting to learn PHP for the server-side. I need this part because I am making HTTPRequests from ROBLOX to a site that can create an announcement on the ROBLOX game. |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2014 12:46 AM |
Firstly, all scripting languages ARE programming languages. Scripting languages are a subset of programming languages. Scripting and programming often have different uses, and your "real" programming language (Java) is also actually very similar to Lua.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
Rye123
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 316 |
|
| |
|
|
| 26 Jan 2014 07:19 AM |
For now lets pretend that a cookie is a programming (or scripting) language. Some cookies may be tastier and easier to eat than other cookies, some may have the health approval even though they're very bad for you, and others are BIG cookies that take forever to eat.
Respect all cookies for what they are. |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2014 07:39 AM |
| just use django, I'm with LuaWeaver on this one. If you want to, install Lua. |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 26 Jan 2014 07:48 AM |
"JAVA(Not script like in unity) or C,C++ or even Visual Basic(And I think I would know since I am pretty fluent in any of these languages)" 1) We know the difference between Java and JavaScript. 2) In C++, what is RAII or the rule of three? 3) You're recommending Visual Basic? Seriously?
"Real programmers do not use Scripting application languages" You obviously don't understand the advantages of embedded scripting languages.
"your name is TheLUAWeaver" So what? Your name has "bad" in it, does that mean I can just assume you're bad at programming and everything else?
"VB 6,VB.net" Being able to code in those languages is nothing special.
"in Java you can save your class and then implement it or include it in another program to reuse" You can do that in Lua or Python too using modules.
"PHP and LUA can only be used in there environment and cannot be used to make stand alone applications." 1) Lua* 2) Their* 3) Lua can be used to create applications. 4) Java too runs in its own environment - the JVM.
@Rye123: Don't use PHP. The syntax is awful and the language works against you. Learn a better language like Python that has lots more uses and teaches you better style. |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2014 12:58 PM |
| Do any of you realize this is for a WEB language? |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 26 Jan 2014 01:00 PM |
| @Julien: That's why I said Python. I'm using it with Django for my site (like Twitter, also uses CoffeeScript, SASS and lots of AJAX + JSON). |
|
|
| Report Abuse |
|
|