|
||||||
| Website Design Forum for discussing flash, graphics, fonts, video and music! Have a question about how to implement something into your website? Ask here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Ok here goes although you may find this request a little odd.
What i would like is some code i can put on my index page that displays a box and a number of current people browsing my site, however i dont want it to be current users i would like it to be a made up number to look like there ara a lot of people browsing my site because at the moment ther isnt any. I know this sounds odd but it would really help me out. cheers |
| Sponsored Links |
|
|
|
|||||
|
You can easily do this in PHP. You just need to get a random number and output it. Then, when somebody refreshes your website they will see a new number indicating how many people you want to "simulate." IMO, I think it's a bad practice to do. I don't like sites that tries to cheat its users, with incorrect information.
Code:
echo "There's currently " . rand(1, 15) . " users online right now!"; // Another alternative is mt_rand. Simply add "mt_" and it will work.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum C/C++ resources - C/C++ frequently asked questions Python resources - Python frequently asked questions I'm always up for a chat, so feel free to contact me... |
|
|||
|
Many thanks for that. I hear what you are saying and its something i have really tried to avoid. I have a good website and need people to advertise on it to make money. Feedback from people who want to advertise are that there isnt enough advertisements on the site hence i need something to sway them and a faked number maybe the way to start my business off.
|
|
|||||
|
If you don't like the idea of using PHP you can always use JavaScript although anyone smart enough will be able to see the code and recognize that you are not actually calculating current users. PHP would be your best bet.
JavaScript Code:
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||||
|
The random number you would generate would have to be a relatively short interval, as jumping from 5,000 to 12,000 in a page refresh would look "sketch".
__________________
Cheap Airsoft Guns If you are looking for high-quality, yet cheap, airsoft guns, then check out MrAirsoft.com |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange error in update app | McMillan0520 | C# Programming | 1 | 08-08-2007 11:52 AM |
| Strange DLL Error, creating controls | ChrisPepper1989 | C and C++ | 0 | 02-26-2007 04:37 PM |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| LogicKills | ........ | 20.00000 |
| sam | ........ | 20.00000 |
| gaylo565 | ........ | 18.00000 |
| |pH| | ........ | 15.00000 |
| WingedPanther | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 67%