it01y2 0 Report post Posted July 8, 2007 Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in which it opens the playlist file and removes the closing tag at the end, so before i can add more entrys.e.g <atx><entry>Location 5</entry><entry>Location 4</entry><entry>Location 3</entry><entry>Location 2</entry><entry>Location 1</entry><atx> But to add more entrys i would have to get rid of the atx, then use the fputs to place the new entry into the file. Notice from jlhaslip: code tags added Notice from BuffaloHELP: Topic title modified. Share this post Link to post Share on other sites
shadowx 0 Report post Posted July 8, 2007 Well i would read the contents of the file into a variable then use strreplace on it to find the atx part and replace it with "" which is nothing, then add the content i wanted and add the atx at the end of it all.make sense? Share this post Link to post Share on other sites
it01y2 0 Report post Posted July 9, 2007 Well i would read the contents of the file into a variable then use strreplace on it to find the atx part and replace it with "" which is nothing, then add the content i wanted and add the atx at the end of it all.make sense? Thankyou I managed to remove the atx at the end of the document and insert new songs then insert the atx again to close the document off.Ty Rob Share this post Link to post Share on other sites
shadowx 0 Report post Posted July 9, 2007 Glad to hear it! I hate being stumped by code that just seems impossible, its usually not though, well unless its my code in which case i might as well just give up! Share this post Link to post Share on other sites
alex1985 0 Report post Posted February 23, 2008 What is atx? Could you explain wider, for what I can use it? Share this post Link to post Share on other sites
dave2win 0 Report post Posted April 8, 2008 Yes what is atx is it some thing like you can add attatchments to? Please explain me . I want to make a BB type thing in PHP.Oh by the way if you finish making the Playlist Script then could you please forward me the source so that I can put it in my BB. I have the working version ready, just need to do the visual themes and other decorative stuff now so the Playlist Script will be a great addon on my BB. Could you please list the features that it supports.Dave****Thanks in adv**** Share this post Link to post Share on other sites