lunny Posted March 13, 2007 Share Posted March 13, 2007 Hi, I am looking to create pages on the fly or dynamically based on user input. For example if i have www.example.com and they visit this and enter 'bob' in a textfield and press submit they create www.example.com/bob.html . How would I go about this ? I am guessing I need to create a folder when submit is pressed in my website directory ? Quote Link to comment Share on other sites More sharing options...
Lumio Posted March 13, 2007 Share Posted March 13, 2007 what for? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 13, 2007 Share Posted March 13, 2007 Only if you want to give yourself a massive headache in administering such a file structure.... Have a look at search engine frindly urls - what your doing does need to be search engine friendly BUT I think it would help you A LOT if you have just one page creating all your pages. Using apahce's modrewrite will let you direct every request to one page - you can then grab info from the url and use it to constuct your page... Quote Link to comment Share on other sites More sharing options...
gargoylemusic Posted March 13, 2007 Share Posted March 13, 2007 Yeah, this seems like a perfect use of Apache's ModRewrite functionality (that is, control this on a server-level instead of PHP-level) Quote Link to comment Share on other sites More sharing options...
lunny Posted March 13, 2007 Author Share Posted March 13, 2007 ok ill explain why.. Im currently doing a project for school in which we want to track email snoopers i.e other people reading your mail. For each users that wished to create a honeypot email we want to create a new URL which has never been visited before so that when the snooper visits we can get his details etc Quote Link to comment Share on other sites More sharing options...
legohead6 Posted March 13, 2007 Share Posted March 13, 2007 why dont you just make it count how many times someone goes there thats not on his username or ip address or whatever?.... Quote Link to comment Share on other sites More sharing options...
lunny Posted March 13, 2007 Author Share Posted March 13, 2007 well I can see that working for one case, but the way it works is many users can subsribe to our 'service' and we would have traps set up at any time. And the user would be able to check the status of his trap. So I would like a different link for every user, so we can determine the snooper for that person not the URL Quote Link to comment Share on other sites More sharing options...
lunny Posted March 13, 2007 Author Share Posted March 13, 2007 When i try to do the following $filename = '.../public_html/newFile.php '; $mytext = 'text'; fopen($filename, 'w+'); fwrite($filename, $mytext); fclose($filename); .. i get Warning: fopen(../public_html/newFile.php ) [function.fopen]: failed to open stream: Permission denied in /public_html/test.php on line 19 Warning: fwrite(): supplied argument is not a valid stream resource in /public_html/test.php on line 20 Warning: fclose(): supplied argument is not a valid stream resource in /public_html/test.php on line 21 How do I solve these problems with my permission Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.