Jump to content
xisto Community

8ennett

Members
  • Content Count

    435
  • Joined

  • Last visited

Everything posted by 8ennett

  1. You need to make the document, write and var lowercase words! <script type="text/javascript"> var BackColor = ""; document.write(BackColor); </script>
  2. That's not entirely true. You can insert php values in to javascript prior to the page being loaded which is exactly what this example is doing. The only way to do it the other way around would be to use ajax to call a seperate php document after the page has loaded.
  3. Really simple one here for ya, works just fine however no letter or number is repeated (will be in the next example): $alphanum = "abcdefghijkmnpqrstuvwxyz23456789"; $rand = substr(str_shuffle($alphanum), 0, 5); // 5 Being the amount of letters/numbers are select from the variable alphanum And if you want letters and numbers to have a chance of being repeated: $alphanum = "abcdefghijkmnpqrstuvwxyz23456789"; $inc = 1; while ($inc < 5){ $alphanum = $alphanum.'abcdefghijkmnpqrstuvwxyz23456789'; $inc++; } $rand = substr(str_shuffle($alphanum), 0, 5); // 5 Being the amount of letters/numbers are select from the variable alphanum And finally for a random length text string with possible repeated letters or numbers: $alphanum = "abcdefghijkmnpqrstuvwxyz23456789"; $inc = 1; while ($inc < 5){ $alphanum = $alphanum.'abcdefghijkmnpqrstuvwxyz23456789'; $inc++; } $rand = substr(str_shuffle($alphanum), 0, rand(3,10)); // 3 Being the minimum amound of letters returned and 10 being the maximum
  4. I've actually just written an article on how to do this exact thing if you want to read, thuoght I would make a new post with it in so everyone can benefit without having to read through loads of replies. Click here to view post, Using Ics (internet Connection Sharing) Over Multiple Routers
  5. Now I spent 5 hours of tearing my hair out to achieve this so just in case anyone else is wanting to do the same then just follow these instructions. What happened was my Brother only lived a couple of houses away from me and he had a wireless network at home. Now my PC's wireless card was strong enough to pick up this signal, however my laptop was not, and seeing as I only use my PC as a server that wasn't very useful to me. I had my own router in my house but no internet connection, and unfortunately my router didn't have the ability to connect to another router wirelessely so I wanted to set up a network at home like so... INTERNET -> BROTHERS ROUTER -> MY PC -> MY ROUTER -> MY LAPTOP So I had my PC connected to my brothers router over wireless, I then connected an ethernet cable (despite what you read online, you do NOT need a crossover cable) from my PC to my router. Next I went to Network Connections in the control panel on my PC (MY PC runs XP) and INSTEAD of bridging the connections between the ethernet and wireless, I enabled ICS on the ethernet connection ONLY. The next problem I had was my router was being the dominant connection and the PC refused to use the wireless connection for the internet, so I logged on to the router with my laptop and changed the routers default IP range from 192.168.0.* to 192.168.1.1 (This is essential as the PC would now be running its own DHCP allocation under the 192.168.0.* address). Finally, still logged in to the router I turned off the DHCP server so that any computer connected to the router (excluding the PC) would then be associated with the PC instead of the router. Also the PC's new IP address will be 192.168.0.1 over YOUR router. Change the IP range of the router connected to the internet to 192.68.2.* as well otherwise it MAY conflict with YOUR router. Now you should have a working internet connection being broadcast through your home from another persons internet connection. Just make sure that both routers are using encryption and MAC filtering for security purposes. IMPORTANT NOTE: Once you have finished using this connection and want to turn your router back in to a normal router, you will have to go in to the connection settings and allocate an IP address manually using the 192.168.1.* range otherwise you cannot log back on to the router. Like I said, 5 hours it took me to figure this one out. I was trying all kinds of different settings etc. but in the end I realised I had just forgotten to turn off the DHCP server on the router!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.