Jump to content

nitch

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by nitch

  1. Hey, I'm having some trouble figuring out how to use php to open a file on another website to get the contents. for example $filestuff = fopen("http://www.tutorialpod.com/index.php","r") or die("could not open"); $contents = fread($filestuff, filesize("http://www.tutorialpod.com/index.php")) or die("could not read"); fclose($filestuff); echo $contents; this code is executing from another website and dies on the fopen statement. What I want is to just get the contents of that page, after the php code is executed on the server and displayed in a browser. Any help is greatly appreciated.
  2. well you could add a counter to the end of the filename. Such as STAFF1.txt,STAFF2.txt and increase the counter everytime you create a file. Seems like you could end up with a large amount of txt files being created though. I don't know how temporary these files are but a solution to this would be to store the file info in the database with a timestamp and delete any entries that are over a certain age.
  3. ah sorry, i didnt understand your structure at first. you are correct that the tables store different content. In this case there would only be 3 or 4 different content tables that a user would be able to add information to so i don't believe having a separate categories table would provide a significant advantage. it would definitely be nice if this site was producing a large enough userbase to have hundreds trying to access at once but that is definitely optimistic. i suppose i could create a table of content for every user that joins but that seems unnecessary.
  4. hmm i dont think i explained my question very well. That is the structure i have come up with. Say i have a users table filled with users then i have 3 content tables content1, content2, and content3. Each user will be able to add information to their account which add a row to one of the content tables. If i had a large number of users with each user adding multiple rows to each of the content tables would this cause the script to slow down significantly? and is there a better solution?
  5. simple question. i am creating a site with a user system. Each user will have their own page and be able to create their own information in different categories that will be stored on the database. the only way i can think of to organize it is to have a separate table for each category and put every user's information into the table. My question is a) could this cause significantly high load times as many users join and add information and b) if so is there a better solution? sorry if thats confusing thanks for any help
  6. i guess what you wanted was people to download the script and run it on their own which might require a little more effort than some people want to put it, a link to the working script might have been a better post
×
×
  • 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.