Forum Moderators: coopster
____________ .html
whatever they put here is what the file will be called
_____________ META Title
whatever they put here will replace the strings on the above page with whatever they typed
_____________ META Desc.
same with meta title
_____________ Upload
upload the video or audio clip here
_____________ Upload files name
what they put here is the name of the video they uploaded like lets call it video.wmv and when they type it here it replaces a string on the generated html page. Like a replace the url in the video embed.
_____________ Video Description
replaces the video description under the video
Its really hard to explain any other ways, i'm hoping someone understands what i'm talking about. Because I ahve friends who know nothing about HTML.
I want it to be like YTMND's upload script (Can't give URL so do a google search :wink:).
Please HELP!
<--METATITLE-->
for example(with a marker for each replacable value). You could then pull the file into a var and use str_replace to swap the value the user entered with it's appropriate marker inside the var. You can then open a file and write the value from your var.
ball4121, it sounds like you are a little out of your depth with what you are trying to do. You might want to grasp some PHP basics beforehand. I doubt jatar_k has time to guide you through the process on a messenger.
dc
so do tons of members here, you're in good hands. dreamcatcher knows the drill ;) I am happy to volunteer time here but I work for money outside of this and mostly I spend time with my daughter (she's been lovingly throwing up all over me for the past 2 days, such a charmer).
let me get a little more specific for you
1. create the template for your html page, mock one up. create a full page that looks exactly like you want and check it all out in your browser.
2. take this same html template and replace each element you would like to be replaced by user input with a tag like I showed you. Here is a rough example
<html>
<head>
<title><--TITLE--><title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="<--METADESC-->">
<meta name="keywords" content="<--METAKEYS-->">
</head>
<body>
<p><--IMGAUDNAME-->
<p><--FILEDESC-->
</body>
</html>
code the upload script
3. so we now grab the info input by the user, we clean it all, then we start building our file from the template with the user input
4. get the contents of the template using file_get_contents [php.net]. Afterwards we will have all the content in a single variable.
5. use str_replace [php.net] to swap the user input with our place holders for title, metadesc, metakeys and filedesc.
6. since the content could be either an image or an audio file we can't include the tag in our template though we did include a placeholder for the full tag. We figure out which they gave us and use php to create the appropriate html for the image or audio. We then swap the finished tag(s) with the <--IMGAUDNAME--> place holder.
7. we need to open a file with the filename given by the user using fopen [php.net]. fopen will create the file if it does not already exist.
8. use fwrite [php.net] to write the information to our new file.
9. use fclose [php.net] to close the file pointer
10. [optional] make sure in your initial test that the new file has the right permissions (that it will be viewable through a browser). If it does not then you may need to use chmod [php.net]
that make it a little clearer?