Jump to content

Digg Style Functionality in PHP.


se1zure

Recommended Posts

I am learning PHP, and I learn through programming, by solving problems. THe only downside to this, is that what I result with may be inefficient, and insecure.

I use Digg.com alot, and was wandering, what would be the best method of making a "Digg this" style applicatoin, which will do the following (I know how to do most of this, but am not sure I am doing it efficiently, or the best way possible).

-- I would liek to do this without the use of mysql, for now at least, as my knowledge of mysql is incredibly limited--

I will create a form, witha  submit button, to be attached to each story. There will be a $title variable which will be set to the name of the story. When the user clicks digg, it creates a txt file named the title of the story (unless it has already been made by the original digger), to keep track of it's diggs. It will cookie the user, and not allow them to digg it again. 9alothough, they can delete the cookie... oh well). I want then, to have the number of diggs displayed byt eh digg button. I realize to do updating inside the page, I would need to use ajax, correct?

Anyways, Here is where I could also use help. I would liek to create a separate page, where any story with more than 10 diggs is displayed. i realize that with mysql, this would be fairly simple,  but is there anyway for a php script to read all the txt files in a folder, then get he name of the txt file, and extract the title of the story?


Link to comment
Share on other sites

Ah I misread, I thought you meant you wanted to add a digg this button to your content - for the actual digg.com
Digg was created in PHP, so it's obviously very possible - but you'd also have to get into mysql or another database, and ajax.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.