Jump to content
xisto Community
it01y2

Creatting A Playlist Through Php script help needed

Recommended Posts

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

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.