Jump to content

Recommended Posts

Hi I need help with something. I'm looking to read a .txt file that has names with links inside that points to streams. I'm wanting them to be displayed as a dropdown <select> box.

 

Text file is like this:

 

Title 1

http://host/title1.m3u8

Title 2

http://host/title2.m3u8

Title 3

http://host/title3.m3u8

 

etc etc etc.....

 

Output needed:

 

<select>

<option value="http://host/title1.m3u8">Title 1</option>

<option value="http://host/title2.m3u8">Title 2</option>

<option value="http://host/title3.m3u8">Title 3</option>

</select>

 

I've been trying to do this for a few hours now and everything I try, Im only getting 1 option working the rest are non-existing. The reason I need this is because the links update every week and they are a total of 800 streams. Entering those in one by one isn't a option I willing to take.

Edited by Irishph4nt0m16
Link to comment
https://forums.phpfreaks.com/topic/300878-php-txt-file-to-strings/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.