Site That Could Handle Millions Of Users?

Nov 13, 2010

What do you need to do so that an existing php site can handle potentially millions of users? I'm supposing here that the site's design and architecture and code isn't really what it should be like for this kind of a site. Alternatively, how would you design a site from scratch that could handle these many users?

View 3 Replies

ADVERTISEMENT - UrlRedirect - IIS6 - PHP -> .NET / 'Web Site' Configured To Handle Via Aspnet And Another 'Web Site' Configured To Handle Using The Actual Isapi Handler?

I am looking to move an existing WordPress installation to a custom platform comprised of a .net based blog as well as other new functionality/modules on the site running under IIS6/Win2k3. There are several thousand posts in the existing WordPress site that have been migrated to the new database structure, however, I'd like to preserve the old urls (for search engine sake).

The application is already using URLRewriting.NET to provide SEO friendly links throughout the site, so I know I can write up a rule to parse/redirect the inbound requests:

Would be handled by something like:

To do it this way, I would need to configure the .php extension to be handled by aspnet_isapi.dll. Is it possible to have one 'Web Site' configured to handle PHP via aspnet and another 'Web Site' configured to handle PHP using the actual php isapi handler? It would seem possible based on the configuration through IIS Manager, though I suspect the whole 'Web Service Extension' bit would cause a problem.

View 1 Replies

Newsletter System - Send Information (posted By Users) To The Mails Of The Other Member-users Of Site

In my site i have smth like newsletter system. Logged in users can post information about their services and this information is shown in my site. I'd like to send such information (posted by users) to the mails of the other member-users of my site. I wont the system to check, let's say, every hour the state of database(if there are any new injections) and if there are new posts these ones could be sent to the other members

View 6 Replies

Create A System Where Users Vote For Site On Toplists And Receive Credit For It On Site's Database?

I'm trying to rack my brain about how to create a system where users can vote for my site on toplists and receive credit for it on my site's database.


user is logged into my site (via cookie) > clicks on voting buttons ( goes to [URL].. , then another, and another, etc ) > user fills out captcha + submits > user credited on my site (max 1/day) Can it be done with frames? I can't think of a way to do this.

View 1 Replies

Multipal Sites Management - Open A Site That Lets Users Register And Create There Own Site?

Does anyone know of a multi-site CMS? I would like to open a site that lets users register and create there own site, i figured that there is probably an open source system to start with.

View 1 Replies

Facebook - Handle Users That Already Have An Account?

I've been using a facebook script to allow users to log into my website using theyr username and password. what happens is that the script allows users to create accounts on the website but if the user clicks again on the facebook button, the facebook widget doesn't know that the user has an account already and tries to create another one.

here is the iframe code:

<iframe src="
fields=<?php echo urlencode($fields);?>"

in the user_add.php i am grabbing the values returned from the facebook login dialog:

$phone = $response['registration']['phone'];
$cell = $response['registration']['phone'];
$zip = $response['registration']['zipcode'];

and i am passing them in a function that creates accounts in my website. But what if the user exists already? What the facebook code will be? and i need the user to enter the username and password from facebook and make a relationship with the username and pass already existent on my website and log them in.

View 2 Replies

Build A Site That Lets Users Contact Each Other Through The Site?

I'm trying to build a site that lets users contact each other through the site.Like an email system in the site only.I'm just looking for some keywords to do research on my own.

View 3 Replies

Handle Multiple Accounts And Users In One CakePHP App?

What I need to accomplish is a single Application with a single database but multiple accounts (companies), each with multiple users. The URL convention must be as follows: [URL] So ALL controllers are prefixed by the company/account name. All accounts would share the single database, but each one would need to be able to restrict access to their data.

how do I implement this? I've thought about implementing some sort of htaccess rewrite where I strip out the first URL parameter (account) and pass as a query string parameter, which would be internally parsed by the app_controller. The challenge, however, is maintaining integrity with all of the links throughout the app. I.e. the cake routing would somehow need to be aware of the account parameter and pass it to all outputted links.

View 2 Replies

Best Methods To Handle Email Notifications To Users?

So I was wondering what others use to handle sending emails from PHP to their users. My concerns are mainly performance and avoiding my emails going to the user's spam folder.Right now I am sending notifications to my users by connecting to gmail/smtp. I notice, however, that sometimes my emails end up in my spam folder when I receive the emails myself. My other issue is that sometimes a whole bunch of notifications are sent out at once, it can be very slow. Especially since the notification each user gets is customized to them, so I can't just bcc a bunch of people on one email.

I would prefer not to use a third party/web service if possible, but would definitely consider it if the benefits are worth it.

View 4 Replies

Handle Logins Zend Auth & ACL On Custom Site?

I have a custom php site and I want to add the ability of ACL and logins.Would it be possible to handle all these with zend functions but without rebulding the whole site on zend framework?

View 1 Replies

1 - 2 Millions Files In One Folder?

I have to store over a million files, 10 - 15 kb each, in one folder.
The files are created by my php script, sometimes the old files are
deleted and new ones are written.
So, basically on every connection my script reads/deletes/ writes files
from/to that folder.
Right now i have only around 300 000 files in that folder, and it feels
like its getting slower for that script to work. It does work at the
moment, but i am not sure what will happen when there is over a million
files there...
Are there any limits of files that can be stored in a folder?
Would it be better for me to use mysql? I am not sure how mysql will
cope with millions of writes/reads

View 17 Replies

Searching Millions Of Files.

I'm currently writing an email application, it reads a pop box and stores the mail body on the file system.

Theres currently nearly 1 million files on the file system called EMAIL_ID.dat

EMAIL_ID being the same as the other details for that mail in the db.

The reason i chose the file system to store the mail body is because the mysql table was too big the other way. over 2gig and ORDER BY was very slow.

Anyone got any ideas on how i can search the file system quickly or if indeed it can be done better ?

View 4 Replies

Handle Consuming Lots Of Data From Multiple Sources In A Web Site?

This is a "meta" question that I am asking in a effort to better understand some tough nuts I've had to crack lately. Even if you don't get precisely what I'm reaching for here or there is too much text to read through, any practical input is appreciated and probably useful.

Assume you have a website that needs to use data that is stored in multiple tables of a database. That data will need to be iterated through in a multitude of ways, used for calculations in various places, etc.

So on a page that needs to display a collection of projects (from one db table) that each contain a collection of categories (from another db table) that each contain 1 or more items (from another db table) what is the best way to gather the data, organize it and iterate through it for display?

Since each project can have 1 or more categories and each category can have one or more items (but the items are unique to a specific category) what's the best way to organize the resulting pile?

My goal in the below example is to generate a table of projects where each project has the associated categories listed with it and each category has the associated items listed with it but I also need to aggregate data from the items table to display next to the project name

A Project Name (43 items and 2 of them have errors!)
- category 1
- item 1
- item 2
- category 2
- item 1

Another Project Name (12 items and no errors)
- category 1
- item 1
- category 2
- item 1

What I did was to retrieve the data from each table and stick it in a variable. Giving me something like:

var $projects = array("id" => 1, "proj_id" => 1, "name" => "aname");
var $categories = array("id" => 1, "cat_id" => 1234, "proj_id" => 1, "cat_name" => "acatname");
var $items = array("id" => 1, "item_id" => 1234, "location" => "katmandu");

Then I went through the variables in nested foreach() loops building the rows I needed to display.

I ran into difficulties with this as the foreach() loop would work fine when building something 2 levels deep (associating categories with projects) but it did not work as expected when went three levels deep (I N C E P T I O N .. hah, couldn't resist) and tried adding the items to each category (instead adding all of them to one item... first or last I don't recall which). Also, when something was present in the third level of the array, how would you add up that data and then get it out for use back up in the top level of the array being built?

I suppose I could have constructed a mega SQL query that did it all for me and put everything into a single array, saving me the loop confusion by flattening it out, but... well, that's why I'm here asking you all.

So, I suppose the heart of this question is: How do you handle getting lots of data from different tables and then combining it all for display and use in calculations?

View 2 Replies

Handle Website Config Files When Importing A Site Into A SVN Repository?

I'm starting to use SVN repositories for all of our websites and wanted to know what the best practise was regarding website config files.Should they be stored in the repository? The problem is the configuration of the websites need to be different for the working copies than that of the live sites. If I edit the config file for a working copy so that I can test on my machine when I commit back to the repository the config file will be updated there too and could then potentially get uploaded to the live site.What do people generally do with config files, is there a way to tell SVN to skip config files when performing commits etc?

View 5 Replies

Store Millions Of Images On Your Server?

Possible Duplicate: Storing a large number of images I want to be able to scale to millions of user profile pics on my LAMP Server using PHP.I currently store all images in one folder, which is a big no-no, so I want to spread them out into many folders and sub-folders (e.g. aa/bb/ etc...).What is the best and most efficient way of doing that, especially if I do not want to have to call the DB to get the filename/path for that user's profile pic?I'm thinking of maybe doing a hash of the username and utilizing the first 4 letters of that hash to generate/locate the path for that user's profile pic, that way I wouldn't have to access anything additionally from the DB since I will always have the user's username. So, for example, if the first 4 characters of the user's username hash were "aabb", I would store that user's profile pic under aa/bb/username/profile.jpg , which should theoretically allow me to scale to millions of users without having to add anything to the DB, while spreading all the pics evenly throughout the aa/bb/ folder structure.

View 1 Replies

Importing - Resizing And Uploading Millions Of Images To Amazon S3?

We are using PHP with CodeIgniter to import millions of images from hundreds of sources, resizing them locally and then uploading the resized version to Amazon S3. The process is however taking much longer than expected, and we're looking for alternatives to speed things up. For more details: A lookup is made in our MySQL database table for images which have not yet been resized. The result is a set of images. Each image is imported individually using cURL, and temporarily hosted on our server during processing. They are imported locally because the library doesn't allow resizing/cropping of external images. According to some tests the speed difference when importing from different external sources have been between 80-140 seconds (for the entire process, using 200 images per test), so the external source can definitely slow things down.
The current image is resized using the image_moo library, which creates a copy of the image The resized image is uploaded to Amazon S3 using a CodeIgniter S3 library The S3 URL for the new resized image is then saved in the database table, before starting with the next image

The process is taking 0.5-1 second per image, meaning all current images would take a month to resize and upload to S3. The major problem with that is that we are constantly adding new sources for images, and expect to have at least 30-50 million images before the end of 2011, compared to current 4 million at the start of May.

I have noticed one answer in StackOverflow which might be a good complement to our solution, where images are resized and uploaded on the fly, but since we don't want any unnecessary delay when people visit pages, we need to make certain that as many images as possible are already uploaded. Besides this, we want multiple size formats of the images, and currently only upload the most important one because of this speed issue. Ideally, we would have at least three size formats (for example one thumbnail, one normal and one large) for each imported image. Replies to any part of the question would be helpful if you have some experience of similar process. Part of the code (simplified)

$pic = $this->image_moo
if ($this->image_moo->errors) {


View 2 Replies

Database - Assign Predefined Values To Millions Of Records In MySQL?

This is my concern: I have a mysql table (main_table) with different columns (id, reg_date, time etc). It has about 30 million rows and grows.Recently I found that I need to assign an additional list/table of 1550 different names (e.g. "Michael Flowers", "Dora Dorn", etc.) to the table. Which name will be assigned to which row is not important, so I can use a random id function. But the name should always be the same when queried from the main_table row.The most straightforward solution would be to alter the main_table and then insert a random value from 1 to 1550 (e.g. 10) for each row. However, I hesitate to do this due the fact I think it would cause performance issues. Another reason is that the number of rows are growing continuously so I may need to add some batch processing. The only restriction is that once assigned a name to a specific row it should always return the same name. For example if I assign "Michael Flowers" (which will have an id anywhere from 1 to 1550, e.g. 10) to a row from the main table (e.g. 30000), I need to be able to always retrieve the same name when I check for the row 30000.Therefore I'm thinking if it would be possible to create a function/algorithm which would make each row from the main_table to map to a name from the 1550 available names, like echo name_of_row(30000); // result would be 10, I may then query and my list and find it's Michael Flowers

View 1 Replies

Users/Search Site

Can anybody recommend and assist with scripts for members (login/pass etc) and also, searching a site after a user has entered a keyword(s)? I already have a great hosting company (, so that is taken care of.

View 2 Replies

Throttle Site's API Users?

The legitimate users of my site occasionally hammer the server with API requests that cause undesirable results. I want to institute a limit of no more than say one API call every 5 seconds or n calls per minute (haven't figured out the exact limit yet). I could obviously log every API call in a DB and do the calculation on every request to see if they're over the limit, but all this extra overhead on EVERY request would be defeating the purpose. What are other less resource-intensive methods I could use to institute a limit? I'm using PHP/Apache/Linux, for what it's worth.

View 3 Replies

Too Many Users Accessing Site

i developed my final project on a windows desktop which i setup with IIS PHP 5 and mysql 5, i designed it to work on a LAMP server with teh same M and P, i now need to put it onto my laptop, but for some reason teh AJAX on this particular site which is vety importan to me is cayuse ing the prob of saying there are too many people trying to access the site, i cant rember how i fixed it?

View 1 Replies

How To Know How Many Users Are Currently Online At My Site?

I want the statistics that how many users are in my domain. that is I have many pages on my site...I want to count them all. I found some php coding that uses file fine but working only for a specific page not for the whole site.

View 3 Replies

Disallow Users With No Ip To Site?

How can you not allow users with no ip to view my web server?

View 11 Replies

Count Users On Site (without Logging In)

I am looking to Count the number of users on the website, without having the user loggin. I have found code which does this but it is in ASP , this uses Session and Application variables, it checks when a session starts and adds 1 to an Application variable, and when a session finishes it minus 1 from the same Application variable. I read that PHP doesn't have Application variables, only Session. Is it possible to add a Global variable in the php.ini to be used the same way? or is there a better way to do this. Please don't reply with a Database suggestion, as this problem doesn't require one, this is for a site with high traffic.

View 7 Replies

How To Keep Track Of Users Visiting Site.

How to keep track of users visiting a site i.e. How much time they spend on each page , To which site they go after leaving site etc.

View 1 Replies

IE Users Not Being Able To Login To PHP Built Site

A few weeks ago, some of our members started reported not being able to login with IE. I have XP and get automatic updates.

I used to be able to login using IE. I found that I now can not login using IE, but can login to members section using Netscape. The site is built in PHP and the site files have not changed.

Anyone else experiencing this type of problem with IE? I've already tried accepting ALL cookies, activex settings are on, dumping cookies, temp files, security setting is LOW.

View 1 Replies

Tracking Online Users At My Site

how can we know online members using php?

View 1 Replies

Copyrights 2005-15, All rights reserved