Jump to content

POC0bob

Members
  • Posts

    9
  • Joined

  • Last visited

POC0bob's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am not sure how to get it to work, though.
  2. I have sort of an odd request. I wish make a POST to roblox.com with the Xsrf token, let me give you what code might help then ill explain more. So, I need to parse the page http://www.roblox.com/My/GroupAdmin.aspx?gid=1039951 to get the token, which is between the (' ') below (this is taken from the site, as an example and the token changes each time the page refreshes/changes. <script type="text/javascript">Roblox.XsrfToken.setToken('IVzHt8XOUJpy');</script> After you get the token, I need to make a post with that token to http://www.roblox.com/groups/api/change-member-rank with the variables: groupId= newRoleSetId= , targetUserId= , X-CSRF-TOKEN: IVzHt8XOUJpy, X-Requested-With: XMLHttpRequest I also might need to log in? which I think is done like so: POST https://m.roblox.com/Login HTTP/1.1 Host: m.roblox.com Content-Length: 29 Content-Type: application/json {"username":"","password":""} but I am not sure, that is just something I found during my research. I know this is possible, I have seen it done multiple times in the past, and I think I have something going... Just not sure how to put it all together...
  3. This is what I tried, but it just gives me an error on the last } <script src="code.jquery.com/jquery-1.7.1.min.js"; type="text/javascript"> var statusIntervalId = window.setInterval(update, 1000); function update() { $.ajax({ url: 'updateturns.php', dataType: 'text', } } </script> It doesn't tell me the error or anything, just says syntax error..
  4. I did a google search on that - But I couldn't find anything on how to do it in AJAX. I knew I needed to do it in AJAX but had no luck. My server will be able to handle the php every second, no problem so I am not worried about that.
  5. Hello, Is it possible to run a piece of PHP code every second? Like what the PHP code does is run a function that does some math on a time difference, then displays it with some text: <?php $gameStarted = gettime($dbtime); list($minutes, $seconds) = minutesSince($gameStarted); ?> <span class="rght">Next turn: <?php if(ceil($minutes/30) > 1){echo("I owe you " . ceil(($minutes/30)-1) . " Energy points."); }else{if($seconds >= 10){$despsec = $seconds;}else{$despsec = ("0".$seconds);} echo (ceil(30 - $minutes) . ":" . $despsec);} ?> But I need it to run that, and re print the number every second. What is, if possible is the best way to do this, and how?
  6. So, this is a bit of a complex thing.. I think. What I need is for an action to happen every 30 min. The action is adding one 'turn' to the user's turns. But this needs to happen even if the user is away, like if the person is away for 2 hours, he/she will have gained 4 turns in that time, but it needs to show how much time is left in the turn (the number doesn't have to update live, just every time the page is refreshed) I have an sql database if that will help..I was thinking of having it so it put a time stamp on the database of the last turn they where at, and then when it reaches 30 min do the query then reset the time stamp, and do that for every 30 min interval all at once when the user signs on.. But I do not know how to do math on the time and stuff. I hope I explained this well enough. I couldn't find anything online about this, unless I missed it somewhere. And just putting me in the right direction (telling me how to figure out if its been more then 30 min since the last time stamp, and if so how many times has it been 30 min, then leaving the remainder) and I should be able to figure it out from there. I wish I had some code to show you, any work that I have done so far on it, but I just got so lost on how to do it, my code got so messed up I just removed it all and tried to start over and here I am, I know how annoying it is from someone to just ask for code, which is why I am not really, Just wondering of someone here knows how to do this. THANKS -POC0bob
  7. So what I need is a function that filters out words, in a text file (new word on each line) and replaces all but the first letter with starts, like if i where to say asswipe, i need to to replace it with a****** the thing is, I also need it to not be case sensitive, and look for repetitive letters, say someone said assswipe.. that second part isn't required - it would just be nice. All i have so far is function LangFilter($string) { $badwords=fopen("./langfilter.txt","r"); for ($i=0;$i < count($badwords);$i++){ $string = str_replace($badwords[$i],str_repeat("*",strlen($badwords[$i])),$string); } return $string; } But it doesn't work. The reason im not saying its a cuss word filter, is there are some other things I would need it to filter, but ill do those my self. I looked on a few other topics, but none of those had what I needed... Any help? Thanks!
  8. Hello, this is a little complicated but I hope I can explain this well enough to get a good answer. So, what I need is a div, or something to display text like a text box, including all the spaces and enters and things that would normally show up in a text box, but still work with HTML code, like links and things, and display those correctly. I am creating a user message system that has some basic HTML features, such as links and stuff, but when I use it as a div, its all on one line and stuff.. Also, another side note, is there a way to protect me from other users putting HTML code in the messages, and it running when they view the mail? All I want it to do is display the HTML code the functions generate before the message is loaded to the client. (PHP) If you have any other questions, please ask. Thanks -POC0bob
×
×
  • 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.