Creating .m3u Files Dynamically
Im looking at creating a playlist program for my server. i have alist of files within my database, and i wanted to be able to place these values into a playlist file. the problem is that i dont know how to get the database to create the playlist form its records. ie, if i uploaded a new file to my server and into the database, then i woudl want the script to automatically grab that file ( SQL i know), anbd the nplace it in the m3u file ( i dont know).
Coudl someone recommend a simple method to complete this? or point me in teh righ t doirection for a tutorial?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamically Creating A Crontab
Is it possibe to dynamically create a crontab. Say i have a form to enter minute, hour, day, etc... and wanted to create a cronjob that ran to those values. Has anyone done this?
Creating Queries Dynamically
I've been struggling with a problem for a while and I think that the solution lies in the ability to create queries dynamically. On one page I have a number of drop-down menus created dynamically, so the number of menus can vary. Each drop-down represents a try/touchdown scored, and the user would select from the menu who scored it. On the next page I want to take the info entered and send it to the database, automatically creating new entries for each try/touchdown scored. Code:
Dynamically Creating An Image With Imagecreate()
I have a multitude of images that I am trying to bring up dynamically depending on the scenario. These images are different sizes. To complicare things just a little more, I am rewriting a javaScript. Am I heading into the correct direction? Here is the original JS that I am attempting to rewrite: (This is most of the way translated to PHP)
Dynamically Creating URLS Based On User Input !
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 ?
Creating Dir, Copy Files And Pass Variables To 2 Files
I need to create a folder on the server weekly named by the user. To this folder copy the contents of an /Original folder. Inside the new folder edit one of the files to insert a data with a XML path generated in another application, copied (via memory) and pasted within the very first form and passed to the file in question. <param name="FlashVars" value="xmlfile= $lanofile" /> the $lanofile is the value that I need to pass from the form to be read by this file. I have created an form (n.php) that POST the name of the folder to a second file (creatdir.php) everything is cool until I have to edit the third file. How can I pass the value of one of the formfileds to a second file and them read this value as a variable to be consumed as mentioned above? Or actually right whatever is on the third field to this position (not using variables).
Dynamically Genetrate RAM (Real Media) Text Files
I am working on a record company's site. They offer a selection of track snippets for stream/download. I would like to be able to dynamically generate the RAM (text File) to save manual input in the DB. Currently each RAM file has to be uploaded everytime a new track is added....but I'd like to have this created on the fly when a user is browsing the site. user selects track...is forwarded to the dynamically generated RAM file...which in turn selects the appropriate media. I can't think how i'd get this to work as I am trying to create a text file that is parsed rather than a peice of HTML that is read by a user. Perhaps on the server I'd have to add PHP Parsing to the RAM mime type?
Dynamically Populate Drop-down List And Dynamically Include Html File
We have a drop down list on a PHP page, with several product names, and when people click one item, we will refresh the same page with the product name as parameter, and in turn we want to include a HTML file into the content area of the same page. I know it is recommended to put everything into database, but we want the web site to be very "portable", so the drop-downlist and the content should both in text files. Let's say the drop-down list will be poplulated from the product.txt file, and there will be a file for each corresponding item in the drop-down list. From the user point of view, if he wants to add a new product, he will just need to open the product.txt file, and add a new line with the product name, "Laptop", then add a new text file named "laptop" in the same folder which contains the HTML fragment to be included in the content area. What is the easiest way to do this?
Creating Files
I was wondering, if/how do you create a file with PHP, Im making a "network" for my site with PHP, and ran across this problem.
Creating Files
Is there a way to create files such as config.ini thoruhg a form. so they put in all the stuff they want and press submit and then the file is created with their settings in it.
Creating Files
I am rather new to PHP and a relative newbie to Linux too. I have a webserver at home (Apache 2.0.48 on SuSe 9.0, PHP4). I have some scripts, one of them needs to be able to create logfiles somewhere on my machine. It must also later be able to read from and write to these files again. Sofar I get a permission error. I tried chmodding 666 or 777 the directory in which the files could reside, to no avail. How do I set up the permissions so that my script can simply fopen a file for writing. Or if that's not the issue, what am I doing wrong or overlooking ? The errors: Warning: fopen(logfileslog1.txt): failed to open stream: Permission denied in script1.php on line 142 Warning: fwrite(): supplied argument is not a valid stream resource in script1.php on line 154 Warning: fclose(): supplied argument is not a valid stream resource in script1.php on line 161 It's the first I am puzzled about, the 2nd and 3rd are a logical consequence. By the way, reading from and writing to a file I have previously created myself with exactly the names I tried to get created by the script (echoed the name, ok) is no problem at all. So I don't think it has much to do with a safemode or open_basedir setting. I also tried creating the scripts in the same dir the script itself resides. Did not work either.
Creating Files
I am currently creating a file manager to add/edit/delete files and folders, etc but i was wondering if there is a function in PHP to create files such as a php file or txt file? All i want is a function that will allow you to create a file from the name you give! Is this possible? I have seen a script called Genesis but the problem is that it is Perl! and i dont have a clue about Perl!
Creating Exe From Php Files
I know for a fact that is possible but can not figure it out, how can I get my application to an exe stand alone file?
Creating And Saving Files With PHP
Hi, hope someone has some ideas !. Is there a way to use PHP and Mysql(if needed) in the following way: Lets say I used a script that when a person enters their birthday info, this script produces an onscreen report (like horoscope), how could this browser screen be saved as a file(html or other) so I could then include it into the body of an email or attach!.
Creating Csv Files From Scratch
I have a db containing customer information (ie. address, phone number, email). My client wants the ability to print mailers from the db. The idea is that the client will run searches on the db, and the search results will be dumped into a file which the client will download. The client will then give that file to their printer, to print the mailers. The printer wants the file in csv format but I'm having trouble finding good info on creating csv files from scratch. Obviously part of the script will output the fields separated by a semi-colon, or some other delimiter, but I'm confused about how to define those fields. Does this make sense?
PHP Scripts And Creating Files
I have a PHP script that attempts to create a temporary file to be used during processing. The script is owned by my username (bryanrme) on the server. When the script attempts to create the temporary file, I get a "failed to open stream: Permission denied" error. The permissions on my directory are set to 755. When I set the permissions to 757, the creation of the file is successful. In this case, I notice that the script spawns a temporary file owned by a user named "99". Is there any way to avoid this? I'd prefer not to leave my directory set at 757, but is there any workaround for this? I checked my server configuration and safe mode is not enabled. Any suggestions? I would prefer that the script handle the creation, usage, and disposable of the temporary file.
Creating Files Remotely
I'm trying to do here is write 2 files simultaneously to both the local server and a remote server on which I have write access. In the process, however, I was stuck at how to create the file initially on the remote server. I tried using touch() which works well locally to create a blank file, but I get an error: Warning: unable to create file http://198.78.114.67/news/tech/20010718-1820.dat because No such file or directory in /home/httpd/html/makepost.php well, I take it touch() only works locally, so, any idea guys?
Creating Text Files On The Fly
What I want to do is allow a logged in user to download a text file version of the list they are viewing on the screen. So if they are viewing the Paid list of users, there should be a button on that same page that says Download To Text File, and when clicked, the user is prompted to download a text file version of the list.
Creating Text Files..
I want to set my access rules to 0777 so that I can delete the text file via script if I need to. I already set the folder to 0777 when I created it.. now I just need the text files. How would I set the access to 0777 when I create the file? This is what I have right now... $text= "this is text."; $fileName = "examplefolder1/example.txt; $handle = fopen($fileName, 'w'); fwrite($handle, $text); fclose($handle); Is there some way to do it in that statement?
Creating And Deleting Folders And Files
Hi to Everyone. After creating trought http a organize number of files and folders. I'm not able to delete them, not even trought an FTP Software like Cute FTP. It replies "Could not delete xxxxx.html".
Strategy For Creating Files And Then Cleaning Up
I'm using PHP 4.3. There is a section of my application in which I'd like users to be able to download a custom file. The file would be different for each user, so I was planning on creating it on the fly when they click "Download". However, I would like to delete the file from the server a certain period of time after they've downloaded it. (It's a 3 or 4K file). How can I do this?
Creating Files Using Fopen That Are Unlocked!
i'm trying to setup my website to create new webpages dynamically using php but I am have a major problem in that whenever i create a file it is always created locked so that it can only be read even when i specify read and write access. Here is a basic example of the code I am using (I am using a Mac OSX 10.3.9): <?php $filename = '/Users/myusername/sites/mysitefolder/newfile.php' $mytext = 'my text' fopen($filename, 'w+'); fwrite($filename, $mytext); fclose($filename); ?> When i run this program all it does is create a blank file with read-only access. My question is what settings do I need to change that will enable me to create writable files using PHP?
Creating Download Manager For Multiple Files
Has anyone run across some sort of download manager to be able to download multiple files at a time via http with PHP? I run a mp3 site and I would like to be able to allow people to download whole folders at a time basically the same functionality as ftp but with http. It would be kind of like the smart download thing that netscape has but cross platform compatible. Any ideas?
Creating .xls And .doc Files With Page Breaks Using PHP / MySQL
Our company currently processes a few hundred form submissions through our site. Up till now, the contents of the form has been sent to our customer support staff in real-time. Each submission goes to a general e-mail box where it's printed through our mail client. A copy of the form is also stored in a MySQL db, although it's not used that often. I have been asked to figure out a way to stop delivering the form submissions in real-time and migrate to the following: Each morning, provide an Excel spreadsheet and word document (or PDF) with a certain number of form submissions to each customer support rep. For example, say 200 form submissions were processed the day before. This morning, I should split those 200 among the 5 support reps and provide each of them a certain amount (which can change daily). Assuming each person gets 40 form submissions, each person would need to be given an excel file and .doc document that contains their 40 form submissions. One of the most important things is that the .doc file needs to have each form submission separated by a page break, so that when they print the document each form submission is printed on a separate page. Finally, not all of the fields from the form submission should be given to the support rep. Maybe date and time is left off.
How To Dynamically Name Variables?
Lets say I have variables named: name1, name2, name3, and name4. How can I call them without having to name them everytime. Something like for ($i=1; $i<=20; $i++){ if $"name".$i { do this } I've tried everycombination I can think of, but am totally confused. I had no trouble naming the variables dynamically in a form, but I can't get php to call them dynamically.
PHP To Dynamically Generate XML
I am interesting in using PHP to dynamically create an XML document and then use XSLT to transform to XHTML. I have come across two methods for doing this. I made two equivalent examples so you can see what I mean. http://members.shaw.ca/petermichaux...SLT_method.html I am interested in critisim of how I implemented each method. However my main problem is deciding between methods. Which method is better for bigger programs where the bits of the XML data are assembled by various php functions that I write? For example, one php function queries a database table for a list of CD titles. A second php function loops through this CD title list and gets the track listing for each CD from another table in the database. Then the composite XML data (ie. CD title and tracks as nodes) can be tranformed to XHTML.
Dynamically Naming Variables
i have this script for that uses 7 pulldowns for the time of an event each day of the week that gets inserted in to a db. Instead of writing the script 7 times for taking the data from the pulldowns, creating a time based on the hour, minute and AM/PM -can i create something that dynamically creates varibles. Basically takes something like $hour1, $minute1 and automatically creates $hour2, $minute2 and so on. This is kinda difficult to explain, heres a snippit of code which i want to duplicate.
Dynamically Resizing An Image
I want to create a thumbnail image. But I don't want to physically resize each image before uploading it (actually, my client doesn't really have the capability). Can I dictate a height (i.e. 108 px) and have a PHP script that will proportionately size down the image using that height? So, if the original is 360 px wide by 540 px high, the image will automatically size to 108 px high by 72 px wide. How would I do this?
Dynamically Generate Mp3 Clip
I have page in which user will upload song and i need to automatically generate a 30 second clip of the uploaded mp3 file and save it can anyone suggest how to do this on linux server which software to use is it possible with ffmepg or ffmpeg-php to cut a 30 second clip or 60 second clip etc. if you have any example then please show me how to do that.
Find Domain Name Dynamically
I have 2 registered domains, which point to the same web root folder. I would like to display a different logo image depending on which domain the user requested. Is it possible to find the domain name with PHP?
How To Change Data Dynamically ...
I'm developing a system where user has a previlage to select his/her COUNTRY then STATE then CITY respectively. i've put all the Country names, State names and City name in a Drop-Down combos which is filled dynamically from the MySQL database. Now my problem is that i want it in such a way that if one select USA as COUNTRY then all the STATE(s) of USA should be displayed on the STATE combo not any other. and then when user selects the STATE in the next combo the CITY combo should be populated with cities related to that STATE only and not with any other.
Dynamically Generate Mp3 Clip
I have page in which user will upload song and i need to automatically generate a 30 second clip of the uploaded mp3 file and save it. can anyone suggest how to do this on linux server which software to use? is it possible with ffmepg or ffmpeg-php to cut a 30 second clip or 60 second clip etc
Updating BIND Dynamically
I am about to start an indepth project for the company I work for. We want to use a PHP front end and be able to make updates to DNS dynamically. I was wondering if I can get some opinions on where to start.
Dynamically Populate PDF Form
I found a free script/class online a few months ago which enabled me to populate pre-built PDF forms with data using PHP; without using any toolkits etc (it worked perfectly). It was simply a PHP script. I lost the script when my PC died recently DOH! Does anybody know where I can find such a script again? I have searched google all night, but all I find is commercial products (not cheap!) or toolkits for generating PDFs', not filling pre-built PDF forms. Here is what I am trying to do: I have built a site for a client which incorporates e-learning. Students take lessons and if at the end of the course their grades are sufficient, they download a PDF certificate. The certificate is in PDF format with Form Fields for the required data. The certificate needs to display the students name, grade and course name. I need a PHP script which can import server-side data into a PDF form which the user can then print or save (flat). The last (and lost) script did this so I know it is possible.
PHP To Dynamically Make New Pages? DOH!
I am building a CMS system for a client to edit add and remove content from his new site, not a problem however he now wants the facility to create new pages and be able to edit the new pages, how do you create a new page dynamically using php and mysql? As in he needs to make a new page called untitled2.php for example, with the title at the top of the page, a description about untitled 2 and then save the newly created page so it appears in the menu and actually exists in the remote server files, then be able to edit this using the CMS system? ERM... Any standard commands as in create_page()? How would I make the new page have variables included so that it could echo mysql content onto the newly created page?
Dynamically Transparent Gif's
Basically what i would like to do is dynamically set the transparency of a selection of images (GIF'S) depending on variables set in a My SQL Database. What i need to do is tint some jpg,s by setting the transparency of a solid blue gif which is set over the top of it in a table.
How To Append A Child Dynamically
i m new in both things php and in this group. but i have some basic knowledge of php and DOM in php. here is my problem, i have one textfield for add a new main node (not main like: <root><this_one></this_one></root>) in my php page and i m able to save the xml file correct with this, and in the bottom of that i have one new textfield for add new child in dynamically create node (which i descibe above),and one combo box for show the all dynamically create nodes.now i want that when user give the value in child textfield and then select a root node for that child from combo box.i want to append a child dynamically to root node. but i m not able to do this. plz try to solve my prob...
Managing Subdomain Dynamically
i don't know if php can do it, here is the picture, what i want is a cheaper way of doing this stuff, newdomain.mydomain.com, cuz when i use the feature of the ISP, it will cost me $1/subdomain per month. any ideas?
Dynamically Load A Class
I want to dynamically load a class using a variable, e.g. $module = new Mod_{$tmp_Name} (); Where $tmp_Name is the name of the class. Is there anyway to achieve this kind of thing?
Dynamically Updating Database
I have drop-down menus created on a previous page, created dynamically so the number of them varies. When the form is submitted I need a script that will automatically add 1 to the value in the playerTries column in the players table, for every drop-down menu. I've tried the code below but don't fully understand what's happening, and why it's not working. Code:
Editing MP3s Dynamically
I'm trying to work out if there's a way of using PHP to dynamically edit an MP3. Is this a bit too much for the old PHP to handle? I just want to cut it down to 10 seconds of audio if possible.
Dynamically Create New Web Page
i'm making a cms, and I have a good portion done, I have it set up where the admin can log in and create a new post which goes to the database. I am just wondering how I can make this post a new web page? I have been trying to study how they do it in wordpress but with no avail. Anyone have any suggestions?
Dynamically Populate A Drop Down Box
I have a website with products for sale and along side each item I have displayed the number of each of these items that are left in stock. What I want to do is to have a dropdown box so that the user can choose the qty of itmes to order but they should not be able to order more than what is in stock. For example if there are 5 items left then the drop down box must be initialised at 0 and show the numbers 1,2,3,4,5. When a purchase is made then the drop down must be adjusted to match what is left in the database. Code:
Dynamically Naming Variables
I'm pulling values from a db, the values are all domain names. Is there any way after pulling them in with a while loop, that I can define a variable name as the value of what I have pulled? $query = "SELECT city FROM cities ORDER BY city"; $results = mysql_query($query); while ($row = mysql_fetch_array ($results, MYSQL_ASSOC)) { $thisiswhereIwantTheValueToGo = $row['city']; } I understand that the above will make the value of the variable = to the $row['city'], is there any way I can dynamically create the variable name based on that same value?
Add Fields To A Form Dynamically On The Fly
I'm looking to create a form the allows the user to input a simple list item by item. However I am not sure how to implement a form that allows the user to add as many fields as the need on the fly.
Dynamically Create And Save Php Page
Here is my code: $filepointer=fopen("http://www.mysite.org/usersetup/newusers/" . $SESSION_UID . "/configsite.php", "w+"); $data = "<? $name = ' . $datatosave. ' ?>"; fputs($filepointer, $data); fclose($filepointer); My goal is to dynamically create a .php file with the contents of <? $name = "variable data"; ?> My code doesn't work. Something with the php page, I think. I and using similar code to populate .txt files with dynamic data, without variables, and it works file. Apparently, a quick change to .php is harder than I thought. I"ve even tried sending a simple line of data to the php page with no luck. Heck, I even tried doing it as a text file and rename to .php but it didn't like my rename.
|