Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts

    A Generic Way To Gather Names of Networks?

    This is a general question regarding PHP so I apologize if it is posted in the wrong section.

    I was looking at digg the other day, and I was wondering if something could be done with it.

    Would it be possible to create an individual digg-like website, with all the functionality, but only show the digg site to the user who belongs to that network.


    For example, let's say I have a digg site for California, and a digg site for Florida, is there any way to do this, and would it help to use PHP's class/object oriented features?
    I am on my way. :)

  • #2
    Regular Coder
    Join Date
    May 2007
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Of course you can, here is your php script

    http://www.phpfive.net/php-based-geo..._article42.htm

    But question is, if i am from california and temporarily i live in florida then your site isn't available for me as usual if there is no choice how to display diggs for california.
    Forum for webmasters and developers
    http://www.htmlfrenzy.com
    Are you an IT expert? Join our Reward system
    www.htmlfrenzy.com/reward-system.php

  • #3
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Smalldog, thank you very much with your advice!


    However, that is a little more complicated than what I need I think. I just want a seperate site, take digg as an example, for each state.

    However, I want to have the user specify his network (or state) when registering, so he will only be able to write to that network.


    Should I use MySQL to create a table that has all the networks, and then display the necessary result to each user based upon their network. And then link each story to an ID of a network ?


    Thanks for any further help/advice.
    I am on my way. :)

  • #4
    Regular Coder
    Join Date
    Apr 2007
    Posts
    295
    Thanks
    0
    Thanked 19 Times in 19 Posts
    Sounds like what you want is more of a permission system, where each group is a state and only has access and can see their particular groups area.

  • #5
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mr e View Post
    Sounds like what you want is more of a permission system, where each group is a state and only has access and can see their particular groups area.

    Partially, if that is what has to happen than that is fine by me. Although I assume it wouldn't be so much harder to have the group be able to have write access to their particular group, but read-only access to groups of others.


    Any let's use digg here as any example.Say I create a website, with a digg page for each city in the united states. Do I want to enter the story into one table, and apply a mysql id number to each story for the city, and then search for that in the database?

    My guess is that would be too much for one table and would create problems with that much text. Any suggestions?

    Thanks for any further help.
    I am on my way. :)

  • #6
    Regular Coder
    Join Date
    Apr 2007
    Posts
    295
    Thanks
    0
    Thanked 19 Times in 19 Posts
    Off the top of my head I would probably do something like this then search for stories where the story usergroup_id equals their usergroup_id

    Not sure if this is the best way though, just what I quick thought up

    users
    id, usergroup_id, name, password, email, etc...

    usergroups
    id, name, title, desc, etc...

    stories
    id, usergroup_id, title, etc...

  • #7
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mr e View Post
    Off the top of my head I would probably do something like this then search for stories where the story usergroup_id equals their usergroup_id

    Not sure if this is the best way though, just what I quick thought up

    users
    id, usergroup_id, name, password, email, etc...

    usergroups
    id, name, title, desc, etc...

    stories
    id, usergroup_id, title, etc...


    Yeah, that would definately work for the search engine feature. Thanks


    But what about actually storing the data in MySQL? Each story will have a maximum length of 1000 characters so I would just use a text field most likely. But would you store all the stories in one table? It seems after a while this table would grow to a REDICULOUS size, making search/access times very long.


    What about making a network table of all the networks, and giving them all a unique ID, then creating a separate table for each network to store the stories?

    Maybe I am completely off here but I am just trying to brainstorm before I start the actual db design so I have an idea of how I should do this.

    Thanks again
    I am on my way. :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •