Jump to content

Badchip

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Badchip

  1. I'm trying to access a public spanish sports channel (with geoblock), via PHP. http://api.goltelevision.com/api/v1/media/hls/service/live It contains: {"code":200,"message":{"success":{"license":"","ip":"XX.XX.XX.XXX","manifest":"http://api-cdn.overon.es/SmilLive/getLiveIOS/playlist.m3u8?system=webgol&stream=webgol_gol24h&token=47836b419952abb5a0a768999ff9fb87&expire=5a503f1c","customData":"","hash":"webgol_gol24h","type":null}}} If I copy/paste the URL (http://...), it opens the stream without problems. However if I extract the URL via PHP (using "extract_unit" function) it does not open. Any idea?
  2. The two hash (#) have solved the problem. Thank you! I have minimized the code: $unit = preg_replace('#[0-9]+\.#', '9.', $unit);
  3. It doesn't work for me. I get a blank page. It's correct \\.test\\.com ? I tried with: $unit = preg_replace('~[0-9]+~', '9', $unit); ... but it changes the whole URL... (all the numbers to 9) Any idea?
  4. I'm using "extract_unit" function in order to extract a URL. Now I want to change the first number (15) to 9. http://name15.test.com/live/test/index.m3u8?token=ab8hH3_1Y-d33BdyW_oxcQ&expires=1515075458 (The URL name/number can vary (for example "http://nemo2.test.com...")) I used the function: $unit = preg_replace('~(?:\A..|(?!\A)\G)[^0-9]*\K[0-9]+~', '9', $unit); but it changes all the numbers. Please can you help me with the regular expressions in order to change only the first number? Thank you in advance.
  5. So I need 2 PHP's for that? please, can you show me an example?
  6. I would prefer via php instead .htaccess
  7. I'd like to open a php called "stream.php" and maintain the same url name when it's open (instead "http://www.site.com/stream.m3u8"). <?php header("Location: http://www.site.com/stream.m3u8"); ?> What do I have to change? Thank you in advance.
  8. Can you give me a hand with the code? I need to open a stream between sunday 9:55PM and monday 1:30AM. I have solved the problem with 2 PHP's but I think it's not the best way.
  9. It works within the same day (for example, Sunday to Sunday)... but it does not work with different days (Sunday 9:55PM to Monday 1:30AM).
  10. Something like this? (stills opening only the url1.php) date_default_timezone_set('Europe/Madrid'); $dtA = new DateTime('sunday 9:55PM'); $dtB = new DateTime('monday 1:00AM'); if ($dtA->getTimestamp() > $dtB->getTimestamp()) { header("Location: url1.php"); } else { header("Location: url2.php"); }
  11. How do I apply it? I have tried two ways but I get an http error 500: $dtA->getTimestamp('sunday 9:55PM') > $dtB->getTimestamp('monday 1:00AM'); if ($dtA > $dtB) { header("Location: url1.php"); } else { header("Location: url2.php"); } if ($dtA->getTimestamp('sunday 9:55PM') > $dtB->getTimestamp('monday 1:00AM')) { header("Location: url1.php"); } else { header("Location: url2.php"); } Thank you for your patience.
  12. I'm trying to set a PHP in order to select another PHP between sunday and monday: date_default_timezone_set('Europe/Madrid'); $dtA = new DateTime('sunday 9:55PM'); $dtB = new DateTime('monday 1:00AM'); if ($dtA > $dtB) { header("Location: url1.php"); } else { header("Location: url2.php"); } It always send me to the url1.php. What am I doing wrong? Thank you in advance.
  13. I found the solution here https://stackoverflow.com/questions/9020592/how-to-get-the-url-of-a-download-link
  14. I want to copy the code after ".m3u8?" in order to use it with another stream. ?hdnea=st=1510277838~exp=151027.................. Is it possible?
  15. I just want the URL of the stream (http://stream.m3u8...") when you click http://link.theplatform.com/s/pf1NfC/9buCiIMqXE9z
  16. I tried with: <?php echo file_get_contents("http://link.theplatform.com/s/pf1NfC/9buCiIMqXE9z"); ?> but I obtain the contain of the stream, not the URL: #EXTM3U #EXT-X-VERSION:3 #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-STREAM-INF:BANDWIDTH=1100000,AVERAGE-BANDWIDTH=1100000,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=768x430,FRAME-RATE=29.970 master1000k.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=2420000,AVERAGE-BANDWIDTH=2420000,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970 master2500k.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=550000,AVERAGE-BANDWIDTH=550000,CODECS="avc1.4d4015,mp4a.40.2",RESOLUTION=480x270,FRAME-RATE=29.970 master500k.m3u8 I just need the second URL than opens http://link.theplatform.com/s/pf1NfC/9buCiIMqXE9z
  17. This URL opens a ".m3u8" stream: http://link.theplatform.com/s/pf1NfC/9buCiIMqXE9z I'd like to extract the URL (via PHP) Thank you in advance.
  18. So can I open the same "index.html" via PHP without the higlighted part? Would it be too much to ask an example?
  19. How to open my homepage "index.html" (via php) and remove the lines: <a href="http://player.mysite.com/player.php?vid=site.com/file.m3u8"> ... (The result would be <a href="http://site.com/file.m3u8"> Thank you in advance.
  20. No other way to detect the URL? (without headers 200|301|302|403 etc.)
  21. The web server is located in Amsterdam, Netherlands. Do you know any alternative in order to skip this error? the only guy who answered my previous messages is you.
  22. I want to open a TV channel with a click. This channel have 3 random/variable URL's. (usually only one works) http://mdsiosgeo1-lh...dex_0_av-b.m3u8 http://mdsios1-lh.ak...dex_0_av-p.m3u8 http://mdsios2-lh.ak...dex_0_av-p.m3u8 The PHP: (try it here) I receive this error: (try the debug here) http://mdsiosgeo1-lh.akamaihd.net/i/mitele/esmediaset_11@168495/index_0_av-b.m3u8 ====> HTTP/1.0 403 Forbiddenhttp://mdsios1-lh.akamaihd.net/i/mitele/esmediaset_11@168471/index_0_av-b.m3u8 ====> HTTP/1.0 200 OKhttp://mdsios2-lh.akamaihd.net/i/mitele/esmediaset_21@168473/index_0_av-b.m3u8 ====> HTTP/1.0 200 OK However I can open/download the URL http://mdsiosgeo1-lh.akamaihd.net/i/mitele/esmediaset_11@168495/index_0_av-b.m3u8 without problems. ("http://mdsiosgeo1..." URL (geo) only works in Spain). Is there any alternative to skip this error 403 Forbidden? I could add the 403 header, but then the other URL's stop working. Thank you in advance.
  23. The problem is I have no idea of programming. Some kind soul can help me out? I guess it's easy for any programmer.
  24. Can someone help me out? I guess it should be easy for you. I need a script to do the following: Open the URL: http://token.mitele.es/?directo=telecinco. (enter the URL manually if doesn't works). The content will show something like this:videoTokenizer({"liveUrl":"http://mdsios1-lh.akamaihd.net/i/mitele/esmediaset_11@168471/master.m3u8?hdnea=st=1445529032~exp=1445529332~acl=/i/mitele/esmediaset_11@168471/*~hmac=5696c0b7f9af89eb8ce5371d99fd7a132e2782e5eda34eb32ae437eb389f3e6b"}); Copy/open the URL with token (removing ""). The result would be: http://mdsios1-lh.akamaihd.net/i/mitele/esmediaset_11@168471/master.m3u8?hdnea=st=1445529032~exp=1445529332~acl=/i/mitele/esmediaset_11@168471/*~hmac=5696c0b7f9af89eb8ce5371d99fd7a132e2782e5eda34eb32ae437eb389f3e6b Open "master.m3u8" and copy/open the URL content, something like this:http://mdsios1-lh.akamaihd.net/i/mitele/esmediaset_11@168471/index_0_av-p.m3u8 Thank you in advance.
×
×
  • Create New...