Jump to content

squiblo

Members
  • Posts

    483
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by squiblo

  1. Hi everyone,


    I have spent many many months working on this project and now it's time to let others see.


    I have developed a website monitoring service that always lets know you the current status of your website no matter where you are via email, SMS and Twitter.


    For all those who give up their time and provide feedback (either good or bad) I am giving $30 worth of account credits when my website goes live.


    Things to keep in mind:


    • Is it user friendly?
    • Does anything unexpected happen?
    • What would you improve?
    • Could anything be explained better?

    Things I really need feedback for:


    • API docs
    • FAQ

    No matter how big or small your suggestion or feedback is I really do appreciate it!!!!


    If you know anything about sql injection or csrf, I am giving you permission to try and break it. This will allow me to fix anything I have missed.


    Please give your feedback to support@serverdox.com


    http://stage.serverdox.com


    The website will be up for roughly 2/3 weeks to gather an adequate amount of feedback and then will be taken down to make further changes. Thank you in advance.


    P.S I've never been this scared in my life, this project is like my baby!


    For phpfreaks: http://stage.serverdox.com/phpfreaks.txt


    • Like 7
  2. I have an array that looks like this...

     

    Array ( 
        [0] => Array ( [0] => 2 [1] => Dylan Cross )
        [1] => Array ( [0] => 5 [1] => Bob Smith )
        [2] => Array ( [0] => 1 [1] => Sarah Park )
        [3] => Array ( [0] => 7 [1] => Jane Knowles ) 
        [4] => Array ( [0] => 6 [1] => Harry Hill )
        [5] => Array ( [0] => 3 [1] => Jack Rock )
    )
    

     

    How do I sort this array so it is ordered alphabetically by the names so the result will be...

     

    Array (
        [0] => Array ( [0] => 5 [1] => Bob Smith )
        [1] => Array ( [0] => 2 [1] => Dylan Cross )
        [2] => Array ( [0] => 6 [1] => Harry Hill )
        [3] => Array ( [0] => 3 [1] => Jack Rock )
        [4] => Array ( [0] => 7 [1] => Jane Knowles ) 
        [5] => Array ( [0] => 1 [1] => Sarah Park )
    )
    

     

    Thanks

  3. I'm trying to come up with a mysql database design so I can have a messaging system, much like facebook's. I want users to be able to send and reply to messages to more than one user at a time, and to delete whole threads without removing it from other users. Please help!

     

    Any questions please ask!

     

    Thanks

  4. I want all my URLs to end with a forward slash (/) e.g.

     

    www.website.com => www.website.com/

    www.website.com/folder => www.webiste.com/folder/

    www.website.com/?u=123 =? www.website.com/?u=123/

     

    This is my current .htaccess file...

     

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule .* - [L]
    RewriteRule ^profile/(.*)$ profile.php?u=$1 [NC]
    

     

    But I don't know how to modify it so the current Rewrite rule will work with the forward slash rule I want. Please help!

     

    Thanks

  5. All my web pages connect to MySQL before the html tag by including a php file like so...

     

    <?php
    session_start();
    require_once "php/connections/dbconnect.php";
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" id="#top">
    <head>
    

     

    All pages connect successfully apart from one, that does not manage to connect about 1 in 5 times. This is the error that I am getting...

     

    Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connecti (trying to connect via tcp://46.183.8.87:3306) in C:\xampp\htdocs\socialnews\php\connections\dbconnect.php on line 3

     

    Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\htdocs\socialnews\php\connections\dbconnect.php on line 3

    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

     

    And this is the contents on the dbconnect.php...

     

    <?php
    //CONNECT TO DATABASE
    $connect = mysql_connect("*****", "*****", "*****") or die(mysql_error());
    $db = mysql_select_db("*****", $connect) or die(mysql_error());
    ?>
    

     

    I have no idea where to start looking because it's such a strange problem. Any idea of what I need to check? Any tips will be appreciated!

     

    Thanks

  6. Thank you ngreenwood6,

     

    It also seems as if you have some fields in there that dont really need to be. For example in the stories table you have a field for totalViews but there is a table for StoryViews which seems to just be storing the views which you should just be able to count the views from that table if needed.

     

    I have a reason for this, lets see if I can explain. When a user clicks thumbUp or thumbDown it will insert a row into "StoryLikes" (if they haven't previously) and will also increment the field "totalThumbUp/totalThumbDown" in the Stories table by 1. This will make it faster for selecting how many likes/dislikes a story has, instead of having to do a COUNT every time. I am sacrificing INSERT and UPDATE speeds for SELECTS speeds. I've tried my best to explain sorry if you don't understand.

     

    Thanks for the help!

  7. Thanks scootstah, that's what I had in mind but I have a little doubt in my mind with this solution. My website will have dynamic pages (like youtube, adding videos).

     

    If I have 1000 "pages" and 10,000 users each visit all of these pages (I know these figures are not true, but I'm trying to plan ahead) that will equal 10,000,000 rows. Something tells me that isn't going to be good, but I have no real evidence to back up my thinking. Is this a problem?

  8. What is the best way to store "page view count", the page view count will increment by 1 if the users IP address is not already stored.

     

    I want to plan for the future in case i start to get a lot of visits, what is your opinion for the best way to do this and why?

     

    Thanks

  9. I have spent some time to come up with a structure. Tell me what you think of it :)

     

    As a scenario, if a user searches for a story I want relevant images/videos/comments selected as quick as possible, with this current design I'm not sure if it is optimized as well as it could be.

     

    *Structure is attached*

    post-85240-13482403158337_thumb.png

  10. I currently have this .htaccess in my root directory

     

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?p=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?p=$1
    

     

    So I can type things such as "www.website.com/page", which is the equivalent of typing www.website.com/?p=page. But now I cant add more GET variables, IE this will not work - "www.website.com/page/?v=data".

     

    What can I do to fix this?

     

    Thanks

  11. Hi guys, I'm working on a project that handles a lot of inserts into a database and uploads files to FTP. Lets say this is the order:

     

    - Step 1: Insert row into database

    - Step 2: Upload files to FTP

    - Step 3: Email user to confirm complete

     

    If the user closes the browser soon after Step 1 has complete Step 2 and 3 will not run.

     

    I would prefer if all 3 steps were complete or none at all. What can I do?

     

    Thanks in advance.

  12. In my .htaccess file in the root directory I have the following:

     

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?p=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?p=$1
    
    ErrorDocument 403 /s/403
    

     

    If I type an address like "website.com/path" that works correctly.

     

    But I want to make sure that misspelt addresses are also handled correctly, if I type "website.com/path*" (accidentally putting an asterisk on the end) I get HTTP Error 403, even though I put ErrorDocument 403 /s/403.

     

    Note: I expected the ErrorDocument to work because it worked for HTTP Error 404

     

    Maybe it is as simple as changing the regex but I'm not sure.

     

    Thanks in advance.

     

  13. Currently I am working on the front end of this project, but soon I know I will have to create a back end structure.

     

    The project is a story system where users can upload there own stories, users will be able to select what category the story fits into, users will also be able to insert related links into the story and also pictures and videos.

     

    The database will be mostly handling SELECT statements, so needs to be fully optimised to read the data as quick as possible.

     

    I have a few ideas of what the structure should be like, but I would also like my fellow "freaks" opinions.

     

    Thanks for the help in advance!

×
×
  • Create New...

Important Information

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.