Jump to content

Cory94bailly

Members
  • Posts

    415
  • Joined

  • Last visited

About Cory94bailly

  • Birthday 07/17/1994

Contact Methods

  • AIM
    cory94bailly
  • MSN
    KoolKid_417@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    Massachusetts, United States

Cory94bailly's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. First you would have to check the time. Then you would need either a cookie or something in a database to determine the time since it was last generated.
  2. Yeah, the creator of the script helped me out last night and told me that. I've never worked with objects/classes before. What happened to the "Topic Solved" button here? Thanks!
  3. class replayer extends users { --SNIP-- public $islive = false; --SNIP-- function chat($id, $nick, $chat) { --SNIP-- <----------- } } There's my code, I want to take the variable $islive from the above class and use it in the chat() function. How would I do it? I've tried making it a global inside of the chat() function.
  4. I guess so.. But it's a free testing host so I have no control over anything.
  5. My updated code: if($_POST['submit_multiple']) { $SubmittedIPs = explode("\n", $_POST['IPAddresses']); echo '<pre>'; print_r($SubmittedIPs); echo '</pre>'; foreach($SubmittedIPs as $IP) { trim($IP); if(isIpaddr($IP)) { echo $IP." = ".gethostbyaddr($IP)."<br />"; } else { echo "Invalid IP Address<br />"; } } } My updated test: The spacing of the array is exactly the same for each one.
  6. I had no idea it existed until you told me Well, now I'm getting:
  7. That's why I'm using trim() on each IP before it's 'analyzed'
  8. I'm trying to make it separate by line breaks, commas, dashes, and spaces would be nice too I don't understand why if I print_r it, it looks normal.. But while checking the IPs, it says they're all invalid except for either the first or last...
  9. What would be your suggestion? I took out \r from the pattern and when I look at it with print_r, it looks fine.. But if I use the actual code, they all show "Invalid IP Address" except for the last one.
  10. The weird thing is that I print_r'd before and it looked fine.. Now you're right. I took out the "\r" from the split pattern and it stopped doing it. I thought \n was used by windows OS and \r was used by others, why is a line break considered \n and \r at the same time?
  11. Well I guess I'll jump right into the code.. The function: function isIpaddr ($ipaddr) { if (ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$", $ipaddr, $digit)) { if (($digit[1] <= 255) && ($digit[2] <= 255) && ($digit[3] <= 255) && ($digit[4] <= 255)) { return TRUE; } } return FALSE; } The loop and IF statement: if($_POST['submit_multiple']) { $SubmittedIPs = split("[\n|\r|,|-]", $_POST['IPAddresses']); foreach($SubmittedIPs as $IP) { trim($IP); if(isIpaddr($IP)) { echo $IP." = ".gethostbyaddr($IP)."<br />"; } else { echo "Invalid IP Address<br />"; } } } There's my relevant code.. Now the only problem so far is that I am getting this: (The IPs and Hostnames are obviously fake..) The problem is that they are valid IP addresses and I've done a few checks to see what's wrong. I've checked the array and it is working fine by splitting up a textbox into an array of IPs and the IPs are fine inside the array. I then tested the script by echoing the output of just the function with each IP, I got all "1"s (TRUE). I just can't figure out why it's displaying both parts of the if statement.. Thanks for any help!
  12. I'm currently making a GreaseMonkey script for a Live Support script that I use on a daily basis. Here's the Live Support's HTML (Client-Side): And here's what I have so far (I was testing): var busy = document.getElementsByTagName('tr')[4].getElementsByTagName('td')[0].getElementsByTagName('a')[1]; busy.parentNode.removeChild(busy); My code is working well but it only removes the bolded part in the above quote. Yeah, I know.. That's all the code I posted is supposed to do... But I'm trying to completely remove " | <a href="javascript:parent.window.do_reject(***)">busy</a></td>" I looked around regex and I couldn't really understand how to use it or if it would even work for what I'm trying to accomplish. It might be hard to understand what I'm asking for.. I'm just trying to remove this: | [b]<a href="javascript:parent.window.do_reject(***)">busy</a></td> from the quote at the top of the thread. If you need more explaining, I will gladly do that Does anybody have any ideas?
  13. As far as I know, there's no limit. They couldn't show only part of the staff, that would cause alot of confusion. But thank you alot. It works nicely It's a chance for me to learn too I'll mark it resolved now.
  14. Exactly. I have the same amount of access that everyone else has. I need to make it count the HTML table rows via the source. I am emphasizing html because I want people to know that it is not MySQL rows.
  15. I know how much you guys hate people asking for help without any starting code but I'm not even sure how to start this.. I want a script to read this page and count all the admins and referees. If anyone is willing to help, here's a sample of the html code: <div class="boxInner"><h3>Arena Referees</h3><table class="list"><thead><tr><th style="width:16px;"></th><th style="width:150px;">Name</th><th style="width:300px;">Position</th><th style="width="150px;">Gamertag</th></tr></thead><tbody><tr><td><a href="http://gamebattles.com/profile/GottaHaveFaith78"><img src="http://media.gamebattles.com/icons/16/profile.png" class="icon16" /></a></td><td class="alt1">Faith</td><td><b>Head Referee</B></td><td class="alt1">GB CombatBarbie</td></tr><tr><td class="alt2"><a href="http://gamebattles.com/profile/Jack.-"><img src="http://media.gamebattles.com/icons/16/profile.png" class="icon16" /></a></td><td>Jack</td><td class="alt2"><b>Asst. Head Referee</b></td><td>Get Jacked x</td></tr><tr><td><a href="http://gamebattles.com/profile/amghawk"><img src="http://media.gamebattles.com/icons/16/profile.png" class="icon16" /></a></td><td class="alt1">Mike</td><td><b>Asst. Head Referee (IS)</b></td><td class="alt1">GB amghawk</td></tr><tr><td class="alt2"><a href="http://gamebattles.com/profile/cory94bailly"><img src="http://media.gamebattles.com/icons/16/profile.png" class="icon16" /></a></td><td>Cory</td><td class="alt2">Referee</td><td>Cory xz</td></tr><tr><td><a href="http://gamebattles.com/profile/crago"><img src="http://media.gamebattles.com/icons/16/profile.png" class="icon16" /></a></td> I'm just wondering how I could even count them. Any help will be appreciated, thanks.
×
×
  • 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.