Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Website Design

Website Design Forum for discussing flash, graphics, fonts, video and music! Have a question about how to implement something into your website? Ask here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-25-2007, 09:57 AM
mandriva mandriva is offline
Newbie
 
Join Date: May 2007
Posts: 14
Rep Power: 0
mandriva is on a distinguished road
Default Strange but i need it.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-25-2007, 10:43 AM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,452
Last Blog:
CherryPy(thon)
Rep Power: 27
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-25-2007, 10:48 AM
mandriva mandriva is offline
Newbie
 
Join Date: May 2007
Posts: 14
Rep Power: 0
mandriva is on a distinguished road
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-26-2007, 08:40 AM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 26
Posts: 5,956
Last Blog:
Performance or Maintai...
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

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:
  1. There are currently <script type="text/javascript">document.write(Math.floor(Math.random()*200))</script> browsing this site.
__________________
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-10-2007, 11:29 AM
Kaabi's Avatar   
Kaabi Kaabi is offline
Programming God
 
Join Date: Jul 2006
Posts: 884
Rep Power: 13
Kaabi is on a distinguished road
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 05:46 PM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads