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?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Edting Media Files
I m developing a website which needs editing of sound .mp3,.avi etc. By editing I mean,cutting and saving it.Can any one tell me wat are the possibilities and if there are any media file editors avl.Your help will be appreciated.
Getting The Size Of A Quicktime Movie Or Other Media Files
I'm writing a php based fileserver/ftp app and I need to be able to display quicktime (and eventually other media) files via the object/embed tags. I've got everything working except for the sizing. I'd like to avoid asking users to specify the size of the file upon upload, if possible. Also, making the size very large to fit anything inside causes major layout problems, so that is not an option. So, I was wondering if anyone knew of a way to get this info from a file. Is there something analogous to getimagesize() for quicktime? I couldn't find anything in the manual. I was also thinking of maybe using a graphics library to export a single frame of the movie as a jpg and then get the size of that. I haven't looked into this yet to see if this is possible. Are there any other ways to deal with this issue?
How Convert Http:// Text To Real Hyperlink?
I have some texts in MySQL databases. When I show this texts in webpages using PHP, I need to convert every ocurrence of http://blablabla.com to <a href='http://blablabla.com'>http://blablabla.com</a> , so my text will really became 'active'. The people who wrote the texts don't know HTML tags so I can't ask them to write explicity <a...> </a> commands. The problem is the same with text that contains the @ charactere, as name@mailserver.com . I have to change this to <a href='mailto:name@mailserver.com'>name@mailserver.com</a>. Please, I don't know how to use regular expression. I think It can make this replacemments very easy..
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?
Sizing A Text Area Dynamically
I have several text areas I am putting information from MySQL into. Right now they are 50 characters wide, by 10 rows. I want the number of rows to dynamically size do that the text area is the same size as the length of the data in MySQL. I've tried all the logic I can think of... taking strlen and dividing it by the width... works great until they use line feeds... if someone puts: "Hello... thanks." the character count divided by the width is off. Here is the code I am using: Code:
Highlight Dynamically Generated Text
I have a search form which makes queries to a database. In the form the user can search for many words (word1 && word2 && word3). I want in the results to highlight the words that the user has searched for. I 've searched in the internet and i've found some codes but none of them works with all the possible results. What I have found so far which is closer to what I want is the following:
Plot Graphic Lines And Text Dynamically
I'm looking for a method to plot graphic lines and text for a bracket-like display with multiple tiers in a browser. I'm familiar with GD for outputting dynamic graphics, but have never utilized its native drawing capabilities. Is it well-suited for this task? Any better alternatives?
Centering Text In A Dynamically Created Image
These are live stats from my forum, taken from my database. As you can see, it looks ok, as long as the values are pretty uniform, but when I get a board style that is only three characters long like this one: Then It starts to look weird, does anyone know how I can center the text and the avatar within a certain area? The max size for a username is 18 characters, the max length for theme is 11 characters, the shortest is 3, the post count, join date, and last visit date still need to be centered, but length doesn't really matter with those. Also, the max size for the avatars are 100x100, the minimum is anything less than that. I know I could get the width of the picture and do some math to figure out where to put it, right now, at full size, the x and y coordinates of the picture are: (45, 48), so that would be the maximum, but I can't figure out how I would calculate the location for things smaller than that.
A Real Challenge For Real PHP Programmers
<?php /* A challenge to every PHP programmer.The one who's gonna solve this problem would be deemed as PSP(PHP Supreme Programmer).The problem is this : You have to write a script that displays a list of categories and subcategorieslike this one: <select name="category"> <option value="1">Main</option> <option value="2">Main > Computers</option> <option value="4">Main > Computers > Hardware </option> <option value="8">Main > Computers > Hardware > PC</option> <option value="7">Main > Computers > Hardware > Mac</option> <option value="9">Main > Computers > Hardware > Atari</option> <option value="11">Main > Computers > Hardware > PC > History of Pc</option> <option value="">etc...</option> </select> The categories and subcategories details are stored in these two tables in a MySQL database. -categories : the categories names and ids. -cat_relations : the relations between categories.It shows which subcategory belongs to which category. The belongings between categories can go very deep and the number of categories is unlimited. This script will create the two tables and fill them with sample data. All you need to do is to change the four variables below. You can send the script back to this email : yasbergy@yahoo.com. */ //Here starts the script. Please change the values of these variables to fit your settings $user = "prospective_PSP"; $database = "db"; $server = "localhost" ; $pwd = "" ; //Connection to the database that you created mysql_connect($server,$user,$pwd) ; mysql_select_db($database); //Creation of the two tables : categories and cat_relations $categories = " CREATE TABLE `categories` (`id` INT not null AUTO_INCREMENT, `name` VARCHAR(100) not null , PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'The categories details' "; mysql_query($categories) ; $cat_relations = "CREATE TABLE `cat_relations` (`id` INT not null AUTO_INCREMENT, `daughter_id` INT not null, `mother_id` INT not null , PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'Which category is the daughter of which category'"; mysql_query($cat_relations) ; //Filling the two tables with sample data $cats = array('Main','Computers','Countries','Hardware','S oftware','Programming languages','Mac','PC','Atari','Winamp','History of the PC','IBM','Components','High level','USA','NYC','LA','Manhattan','India','Winzi p'); for ($i=0;$i<count($cats);$i++){ $sql = mysql_query("insert into categories (name) values('".$cats[$i]."')"); } mysql_query("insert into cat_relations (daughter_id,mother_id) values (2,1),(3,1),(4,2),(5,2),(6,2),(7,4),(8,4),(9,4),(1 1,8),(12,8),(13,8),(10,5),(20,5),(14,6),(15,3),(16 ,15),(17,15),(18,16),(19,3)"); //Now you can have a look on them through phpMyAdmin ?>
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?
Streaming Media
Who has experience with setting up a php-site with live video from DV-camera's?
Php And Media Viewers
Does PHP have any facility for utilizing flash, shockwave, quicktime, or any such media viewer from inside some browser application?
PHP In Windows Media ASX File
What I am trying to do is get my Windows Media Player embedded pages to point to one .asx file instead of having to manage the stream links of some 30 odd pages individually. My question is how would I get the html page to "submit" the info to the asx file? Is there a way for the page to automatically submit the stream info to the ASX file using the POST method?
How To Upload Media File?
upload media file. I had tried for that but getting following result after uploading wmv file in $_FILE variable. [MediaLink1] => Array ( [name] => bada_gosht.wmv [type] => [tmp_name] => [error] => 1 [size] => 0 )
CMS With Media Content On Another Server
so I'm the author of a pretty big CMS system (big as in huge, not market-share big) and I've been thinking about a problem for a few weeks here on media management. The CMS accomodates both images/media uploaded by admins, but also by members (in forum and blogs and such). Nothing strange about that at all. But now I'm faced with the need of moving - physically - all my media to a separate server, for distributed loads. I.e. when deploying the CMS you can either set localhost or media.exampel.com as your media repository. This makes for two problems - as far as I can think of: 1. Upload Upon surfing to www.example.com, and uploading an image - the image has to be moved to media.example.com after it has been uploaded to the first server. Right? The media has to be moved first from the client, to the www server and then from the www server to the media server. As far as I can tell, there is no other way to do this. I have several functions to handle uploaded files, the most important one is: move_file($original_path, $to_dir); And to handle this, this function has to know when media server isn't "localhost" and facilitate the transfer to the other server, maybe by a second POST to media.example.com? 2. <imgtags The next problem is when the PHP script should output an image that is physically located on another machine. Today, I use imagemagick to convert it to the wanted size and geometry and saves it in a cache directory and then outputs a <imgtag that points to this directory. With the file on another server, the PHP script on the www server can only output something along the lines of: <img src='http://media.example.com/img.php?path=/path/to/file.jpg'> For example. And img.php on media.example.com will do all the conversions needed (in accordance to whatever size or geometry specifications sent along in the IMG tag). But, this isn't valid HTML. the <imgtag should always contain width/height parameters or it will not validate. Not that my code validates perfectly anyway, but I rather have this information since it speeds up parsing by the browser as well. Is there anyone out there that has done something like this before and knows a good way to get something that isn't half-bad?
Windows Media Player And COM - How?
I need to be able to play windows media files on a server to test validity of streaming URL's and whether the file actually plays. This needs to be done serverside (so a check can be run nightly / hourly) so I thought I might use phps COM object to load the windows media player and use the exposed methods to do this. Basically all I will need to do is: check the address doesnt return a 404 etc (easy) check the videos duration. Can someone point me in the right direction to actually using the Windows Media Player with the COM object? I dont know where to find a list of available applications that can be exposed through the COM object, Ive tried a host of options to load the player: $wmp = new COM("WMPlayer.OCX"); $wmp = new COM("WMPlayer.Application"); $wmp = new COM("mplayer2.application"); $wmp = new COM("x-mplayer2.Application"); etc with no luck OR suggest an alternative idea / method? If I cant do this easily I will write a c++ console app to do it but would like to keep it within php to allow easy maintenance / upgrades later on.
Parsing Text Files
I have a little brain freeze going here. I can't remember how to do this. I'm trying to parse a text DB file and seperate all information in it so that I can insert them into MySQL as seperate values in seperate fields. for example, 1 | howdy | there That would be three peaces with three different fields in MySQL. I know I've done this before but can't for the life of me figure out how I did it. All I need is somebody to jog my memory and get that little brain of mine weorking again.
Upload Text Files
Its only once you've got loads of content that you start filtering what people see based on their prefferences. To get lots of content you need to get people to upload text files which end up on web pages extending your site.
Cookie Text Files
I just added some cookies to my page, and they work fine, but I just wanted to know what the lines mean when I view the file in Notepad. PHP Code:
How Get Differences Between Text Files:
I have two text (configuration files) and I'd like to get the difference between these files. I'd like something like "diff" in linux or differences in wiki. how can I do?
Uploading Text Files
I'm somewhat new to this whole MySQL/PHP thing and need a little help. My web hosting service uses phpMyAdmin and at the bottom of the screen iis an area where I can upload a text file to populate a table. I have a table named groups with two fields: groups_idauto-increment primary groups_name So how do I create my text file to populate this table? I'm going to use MS Notepad. If it's set to auto-increment, do I need to include the number? If so, does it start at 0 (zero)? Would the file look like: 0,students 1,faculty 2, staff or just students faculty staff (though I can't image that working).
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.
Text Files Hit Counter
I have a script that I am using for text file based hit counter. I have been noticing that my the original hit count, in my text file has been fluctuating from the original amount to a very low amount. What is causing this and is there a good way to fix it? Code:
Create Different Text Files
I need to create a different text file every time a user registers. Currently every time a user registers there details are sent to "users.txt". So all user details are in the same text file. I would idealy like each text file to be named after the username registered. Here is the code currently being used: $username = $_POST['username']; $password = $_POST['password']; $data = "$username, $password /n"; $fh = fopen("users.txt", "a"); fwrite=($fh,"$data"); fclose=($fh);
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?
Text Files Into Array
I'm trying to read a text file that has a bunch of names in it into an array so that I can output that array to a comma separated format. My problem is this, I do not know how to make a file go into an array, I've tried the explode function, but all that does is spit out "Resource ID" the format of the file is "1. FirstName LastName" with line breaks so the next line is "2. NewFirstName NewLastName", and so on...
Thumbs Of Plugin Based Media?
just doing some thinking for some work i have in mind which involves using the image functions in php.bascially what i want to know is - is it possible to make thumbs of plugin based media in a site? for example a thumb snapshot of a flash, or vrml or whatever?? this is just research i am doing so any ideas thown around would be greatly appreciated even if you're not sure if the ideas work or not!!
Transparenty Serving Media Stream
i have a problem - i need to hide address of broadcasting computer in internet, problem looks like this - i hava a computer with windows media encoder, this computer is broadcasting online stream video, now i need to share with this video on internet without windows media server, i have idea that i can open this stream with php and send it forward - but how to do it ?? it is posible to that ?? maybe some other solutions for broadcasting live video without costs?? -broadcasting server must be on windows ;-(
Indexing Text Files In A Folder
I'm newbie on Php. I cannot write codes but only modify. I need a code doing this: I'll put text files in a folder like file1.txt,file2.txt ... I want to search this files, list most recent 10 and if files call, script will put into the site design with <pre> tags.
PHP - MySQL - Text Files - Speed
I've got a question that I'm sure is answered somewhere but I haven't run across it yet. I've got a site with a lot of content that's being pulled from a database. Most of the content changes on a very regular basis.. I take it, push it into some templates, and render it to the screen.. pretty standard stuff.. But some of the pages have large blocks of static content. Just as an example, lets take about 50 lines of formatted static HTML. This content doesn't change very often at all. The site is already designed to push through a template, so putting the content into static HTML pages isn't an option. The question is, should I store that content in MySQL or in a text file? I figured that MySQL would be easier on the system. The fetches seem like they would be pretty easy for MySQL to handle, no complex queries. I figured that pulling from a text file would require apache/php to open the file, read the file and then close the file every time someone hit that page. Am I putting unwarrented stress on our database?
Questions On Merging Two Text Files....
I will have a form field that will allow one of two text files to be uploaded to the db. This text file will have sections that are defined something liek this;
Opening All Text Files In A Folder
Im very new to php and need a bit of help. basically what I have is a folder with a number of text files inside. What i need to do is open every text file in that folder and then process the information inside each text file. Im not really sure but I would assume I open the directory and place the name of each text file into an array and then loop through the array and process the contents of the text file. #open directory #foreach text file in the directory #store file name into an array #loop through array #process code
Php Template For Multiple Text Files
I have over 800 text files. I need one php template webpage that can pull in text of requested file on request in url. Example: http://www.gothinia.com/chronicle/epos.php3?title=Title_Of_Text_File_With_Story.txt would place text of Title_Of_Text_File_With_Story.txt inside template called epos.php3 what code will do this in a simple effiencient manner?
Changing Data In Text Files
Is there an easy way in which I can edit values in a text configuration file? I am creating a form based interface to administrate a few text based config files. I can get the values from the file by parsing it line by line, but I cannot find an efficient way to edit data based on changes submitted in the php form. Is there any way to get to a position in a file and then overwrite any information?
Opening Text Files And Storing Them In A DB
I have a directory full of text files I need to open and store in the DB..... My question is about the file system stuff... I wanna open all files in a directory one by one is there a way to do a while loop of the files?
Includes And Writing To Text Files
i have 6 scripts, each writing to a text file. in addition, i have an index file with links to all the text files that includes all of these scripts. the problem is that the index file will run one script off the include list and then stop. it's incredibly bizarre to me and i'm not sure why it's happening.
Reading Variables From Text Files
I am playing with several text files that have variables stored in two different ways. One text file stores the data like this: hair=brown eyes=green gender=male The other text file stores data like this: hair=brown&eyes=green&gender=male How can I read the variables from the text file and use them in my php program? I know how to write them to a text file, but have no clue as how to read them.
Using PHP Offline To Manipulate Text Files
I need to create an application that will do fairly simple text manipulation on 20,000 files in text format (html files). The files exist both on my Windows machine and on a FreeBSD server. I prefer to do the manipulation on my machine where it's easier to create backup copies, recover from programming errors and so on, then upload the files to the server. All I'm doing is extracting certain elements from each file and creating a different file with the same content that will look better. I could do this in FrontPage (or even Notepad) if I didn't have 20,000 files, so I need to write an application that go through each file in a directory, open it, locate the relevant text elements and create a new file that has these text elements in an appropriate format. I'm comfortable that I can write an application like this in PHP, even though I do not have PHP installed on my computer, which is a Windows box and is not being used as a server. Does this make sense? Can I install and use PHP for this purpose without lots of server-related baggage?
Storing Classes In Text Files
is there a way to store class in a text file? and then recall thjem? and is there a better way to store variables and such than a text file, so its unreadable? what i mean abou my question is.. is it possible to make two classes: User1 and User2, and then recall them so you can get User1.password and User2.password, User1.ID, User2.ID, etc.
Align Text And Searching Files
i would like to align my following code so that it sets it to the left side of the ;page. ive tried a few things but didnt work. also i would like to have it so that it only searches for picture and movie files. how would this be accomplished? Code:
Comma Separated Text Files
A client has requested that I make a php app which takes an uploaded image, reads the values and enters them into a database. I've made the upload script which works fine, and the script which enters the values into the database, the only thing left now is how do I make PHP read the file and extract the values? The file is a text file, each field comma separated.
Grabbing Text From Files/strings/etc
Wondering how to grab pieces of text from a file. Let's say I opened a webpage and want to have all the values of the input fields. This would be the contents of the file <html> <head> ... </head> <body> ... <input type='hidden' name='hidden_w' value='123456' /> ... </body> </html> Now I want that value of the input field 'hidden_w' to be in the variable $w. How do I this?
Window Media Player Video In Browser
Using the window media player plugin to show a video into the web. But when the page loads some time the video started downloading rather than running in media player. is this the problem of browser? or some thing else? here is my code ....
Open, Search, And Process Other (text) Files
How could I use php to open, read, and perform operations on a file? Say I wanted to open somefile.htm and search for instances of <p class="one">Foo</p>, strip the tags, then put 'Foo' in a variable called $foo... Is this doable?
Full Text Search In PDF And Word Files ?
I need to perform full text searches on a batch of PDF and Word files. What is the best way to go? After some research, I'm thinking of extracting the plain text from the files with "pdftotext" and "catdoc", hamonizing the various possible encodings to UTF-8, storing the text in a MySQL database, and then using the full text search capabilities of MySQL. Do you think that would work well? I am told that the files are mostly text and won't be longer than 30 pages.
Problems W/PHPmyAdmin Inserting Text Files
I have been having some trouble with inserting text files into my MySQL database using PHPmyAdmin. I have used it before with success on other databases. Are there certain versions of MySQL that do don't support this. Whenever I try and submit the file it simply reloads the 'Insert Text File' form??
|