Jump to content

KingOfHeart

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by KingOfHeart

  1. Yes. If the Wifi Link can send out a search for Wifi, I'd assume it could be used the other way around.
  2. "I use a phone wire for my home internet." I don't use a wireless network. My Ipod can connect to any wireless network, same with my Wii.
  3. KingOfHeart

    Wifi

    I have a USB wifi link. I am able to use this device to connect to other wifi connections. What I want to know is how to use it so I can connect to my home computer with my Ipod, and Wii. I use a phone wire for my home internet.
  4. Probably, but not allowed to access those tables. So there's no function to check two different arrays for matches?
  5. Well I managed to get all the information for birth into an array, and users into another array. How do I search two arrays and see if there are any matches between them?
  6. Array ( [id] => 13610 [name] => enormantuckere [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=13610 [link] => enormantuckere ) Array ( [users] => Array ( [2010-11-06 16:20:52Janus] => Array ( [id] => 420 [username] => Janus [name] => Janus [group] => 1 [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=420 [link] => Janus [hidden] => [is_last] => ) [2010-11-06 16:20:02Guardian] => Array ( [id] => 264 [username] => Guardian [name] => Guardian [group] => 11 [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=264 [link] => Guardian [hidden] => [is_last] => ) [2010-11-06 16:14:00Rowan] => Array ( [id] => 93 [username] => Rowan [name] => Rowan [group] => 1 [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=93 [link] => Rowan [hidden] => [is_last] => 1 ) ) [guests] => 18 [hidden] => 1 [buddies] => 0 [num_users] => 4 [total_users] => 22 ) Array ( [0] => Array ( [id] => 534 [name] => Aleksey [age] => 21 [is_last] => [is_today] => 1 ) [1] => Array ( [id] => 2015 [name] => The_Dark_Man [age] => 20 [is_last] => [is_today] => 1 ) [2] => Array ( [id] => 2003 [name] => Layer 01 [age] => 25 [is_last] => [is_today] => 1 ) [3] => Array ( [id] => 2981 [name] => Dustbin [age] => 20 [is_last] => [is_today] => 1 ) [4] => Array ( [id] => 5942 [name] => Ryu Hayabusa [age] => 21 [is_last] => 1 [is_today] => 1 ) ) Helps a bit. So that means one of the $online array would look like this? $online['users'][2010-11-06 16:20:52Janus][username] Since I only need the username array that might make things a little tricky.
  7. print_r($lmem); print_r($online); print_r($birth); OutPut... Array ( [id] => 13610 [name] => enormantuckere [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=13610 [link] => enormantuckere ) Array ( [users] => Array ( [2010-11-04 22:59:11Guardian] => Array ( [id] => 264 [username] => Guardian [name] => Guardian [group] => 11 [href] => http://www.thegaminguniverse.com/forum/index.php?action=profile;u=264 [link] => Guardian [hidden] => [is_last] => 1 ) ) [guests] => 5 [hidden] => 1 [buddies] => 0 [num_users] => 2 [total_users] => 7 ) Array ( [0] => Array ( [id] => 148 [name] => Knuckles [age] => 24 [is_last] => [is_today] => 1 ) [1] => Array ( [id] => 12290 [name] => xgmx [age] => 18 [is_last] => 1 [is_today] => 1 ) ) How do I check to see if there's a user in the $online list that matches $lmem ? How do I check to see if there's a user in the $online list that matches $birth ? I only want to check username arrays but I'm not sure how to do that even. I got some more questions but I'll wait until I can get some answers. I have no control over this array (no authority), I just output it.
  8. Are certain letters longer then others in different fonts? I'm not asking for the pixel width. Not actually sure for the font but I believe it's Times New Roman.
  9. What's the longest letters for width. The letter i is probably the shortest in width. w is kind of long but capital W may be one on the longest.
  10. It's the -1. I removed the -1 and it seems to work just fine. Told you it was the version issue. Forgot to mark solved.
  11. It's the -1. I removed the -1 and it seems to work just fine. Told you it was the version issue.
  12. Finally got the right combo. <? $fp = fopen("temp.txt", "r"); $buffer = fread($fp, 120000); fclose($fp); $lines = explode("\r\n", $buffer); $t = 1; $n = 0; while($n < 939) { if(substr($lines[$n],0,1) == "*") { $lines[$n] = "o_tile1" . $t; $t++; //echo $lines[$n]; } $n++; } //return; $fp = fopen("temp.txt", "w"); $buffer = implode("\r\n", $lines); fwrite($fp, $buffer); fclose($fp); ?>
  13. explode returns nothing, that's what I'm saying. It's because of that -1. I want to get the same result but can't use a -1. So what do I do?
  14. I got this script to replace all the lines with a * to a name. It looks like it works but there's no line breaks when it outputs. <? $fp = fopen("temp.txt", "r"); $buffer = fread($fp, 120000); fclose($fp); $lines = explode("\n", $buffer); $t = 1; $n = 0; while($n < 939) { if(substr($lines[$n],0,1) == "*") { $lines[$n] = "o_tile1" . $t . "\n"; $t++; //echo $lines[$n]; } $n++; } //return; $fp = fopen("temp.txt", "w"); $buffer = implode("\n", $lines)."\n"; fwrite($fp, $buffer); fclose($fp); ?> What did I do wrong?
  15. My host changed it's default php support. http://php.net/manual/en/function.explode.php Quote: 5.1.0 Support for negative limits was added 4.0.1 The limit parameter was added ************ By default the - limit does not work.
  16. $out = wordwrap($data,400,"@"); $output = explode("@",$out, -1); By default a -1 no longer works properly for me so I need a similar method to get the same output. I made a game back then that reads the php file. So I could change the extension to .php4/.php5 (forget which one would work) the sockets will still link to the default .php file. So how can I fix this?
  17. Well I just learned that if you combine a while loop and use socket_recv($socket, $buffer, 1024, 0); it will still run if you close out your browswer. I have it read a textfile. I closed out the browser, changed the textfile and it still sent the new message. This was 5 min after I closed it. So I'm guessing there's no way to stop this file at all except for to let it finish.
  18. The bugs not going to be fixed until there's a new version... Anyways let's go crazy
  19. I'm using a program to connect to a website. This program has one bug in it, if it receives data more then 500 bytes it crashes. So on my website I've been using "usleep(100000);" which helps break up the data. Is there any other functions that can split up sending data without any type of delay? Also would a really highspeed internet put the data together with that current usleep, because with my speed it splits it up just fine.
  20. I don't think socket select was needed as I got it to loop much faster now. <? $host = "79.99.135.253"; $port = 6667; $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $data = "NICK Freddy_Krueger2"; $data .= chr(13); $data .= 'USER Freddy_Krueger2 "thegaminguniverse.com" "irc.thegaminguniverse.nl" :Murderer'; $data .= chr(13); socket_connect($socket, $host, $port); socket_sendto($socket, $data, strlen($data), 0,$host,$port); $join; $chatmsg; $n = 0; while(true) { if ($n == 0) { include "msgs.php"; if($join) { echo "<u>" . $msgs . "| $nomsg</u><br>"; if($msgs != $chatmsg) { $chatmsg = $msgs; $data = "PRIVMSG #oz :" . $chatmsg . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $chatmsg<br>"; } } } $n ++; if($n > 20) $n = 0; if($nomsg > 50000) { socket_close($socket); } socket_recv($socket, $recieve, 1024, 2); if($recieve == $buffer) { $nomsg ++; continue; } $buffer = $recieve; echo "Recieved: $buffer<br>"; $nomsg = 0; $pingpos = strpos($buffer,"PING :"); $pingcode; if($pingpos !== false) { for($n = $pingpos + 6; $n < strlen($buffer); $n++) { if($buffer[$n] == 13 || $buffer[$n] == 10) break; $pingcode .= $buffer[$n]; } $data = "PONG :" . $pingcode . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $data<br>"; if($join == false) { $data = "JOIN #oz" . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $data<br>"; $join = true; } } } ?> Looks like include will no longer work because of a 30 second execution time. So I'm hoping I can use Javascript to submit future messages.
  21. <? $host = "79.99.135.253"; $port = 6667; $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $data = "NICK Freddy_Krueger2"; $data .= chr(13); $data .= 'USER Freddy_Krueger2 "thegaminguniverse.com" "irc.thegaminguniverse.nl" :Murderer'; $data .= chr(13); socket_connect($socket, $host, $port); socket_sendto($socket, $data, strlen($data), 0,$host,$port); $join; $chatmsg; while(true) { include "msgs.php"; if($join) { echo "<u>" . $msgs . "| $nomsg</u><br>"; if($msgs != $chatmsg) { $chatmsg = $msgs; $data = "PRIVMSG #oz :" . $chatmsg . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $chatmsg<br>"; } } $sock = array($socket,$socket); if(socket_select($sock[0],$write = null, $except = null, null) == 0) continue; socket_recv($socket, $buffer, 1024, 1); if(strlen($buffer) == 0) continue; echo "Recieved: $buffer<br>"; $nomsg = 0; $pingpos = strpos($buffer,"PING :"); $pingcode; if($pingpos !== false) { for($n = $pingpos + 6; $n < strlen($buffer); $n++) { if($buffer[$n] == 13 || $buffer[$n] == 10) break; $pingcode .= $buffer[$n]; } $data = "PONG :" . $pingcode . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $data<br>"; if($join == false) { $data = "JOIN #oz" . chr(13); socket_sendto($socket,$data, strlen($data), 0,$host,$port); echo "Sent: $data<br>"; $join = true; } } } ?> include "msgs.php"; < This is what I meant when I said include. The java part can wait a bit, just want to get it to send and receive properly first. I don't think socketselect will work for just one socket. Even when I made it an array it still didn't work.
  22. I notice it does not loop until I receive a message. socket_recv($socket, $buffer, 1024, 0); < So this is wrong. I tried changing the flag number but either got a flood or an error.
  23. Just a file with a single variable. I have the word include within the loop. I'm thinking it just takes it a while to understand it's updated. Do you think a submit button would work for submitting data? How would you script a simple forum with a submit button that uses java script?
  24. When I use an include file to send a message it takes it forever to send. However receiving messages is instant. Reading a file takes just as long. So what method can I use to send out messages just as fast as receiving them?
  25. Well after 10 minutes or so it finally quit. No idea if it had to do with reconnecting a few times or what.
×
×
  • 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.