fork download
  1. <?php
  2.  
  3. $string = "magnet:?xt=urn:btih:0eb69459a28b08400c5f05bad3e63235b9853021&dn=Splinter.Cell.Blacklist-RELOADED&tr=udp%3A%2F%2Ftracker.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337";
  4.  
  5. $regex = "/^.*?btih\:([^&]+).*?tr\=([^&]+).*$/";
  6.  
  7. if ( preg_match($regex, $string, $resultados) ) {
  8. echo $resultados[1] . "\n";
  9. echo $resultados[2] . "\n";
  10. }
  11.  
  12. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
0eb69459a28b08400c5f05bad3e63235b9853021
udp%3A%2F%2Ftracker.com%3A80