Hacker News new | comments | show | ask | jobs | submit login

EDIT: HN doesn't render that code very nicely, here's a pastie: http://pastie.org/1416631

Hi there, your home page is very simple, render it in plain HTML and post the signup to queue.php.

In queue.php put:

<?php $data = serialize($_POST); mysql_connect('localhost','dbuser','dbpass'); mysql_select_db('dbname'); mysql_query('INSERT INTO cache(cache_data) VALUES(\''.mysql_real_escape_string($data).'\')'); echo 'YOUR REAL PAGE SHOULD BE HERE WITH A MESSAGE ABOUT BEING IN THE QUEUE'; ?>

The cache table should just be a PK cache_id and a text field (or perhaps mediumtext). I've suggested using a database instead of a filesystem based cache because, if you're doing this quickly, doing it using MySQL means you're less likely to run into file permissions or security problems.

Then you're at least capturing everyone's information whilst you figure out how to scale.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: