Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z zmienną PHP
alkesz1718
post
Post #1





Grupa: Zarejestrowani
Postów: 98
Pomógł: 0
Dołączył: 8.12.2014
Skąd: Czernina

Ostrzeżenie: (0%)
-----


Witam, od jakiegoś czasu pracuję nad pewnym projektem strony muzycznej gdzie player dodawany jest z bbcode np:
  1. [hl=http://hu.lk/m1sq63fee6f4]


w swoim oprogramowaniu strony gdzie ten tag zmienia na player mam coś takiego:

  1. /* Hulkshare Player */
  2. function build_hulk( $matches=array() ) {
  3. global $config;
  4. $hurl = $matches[1];
  5.  
  6. if( $hurl == "" ) return;
  7. if( preg_match( "/[?&;%<\[\]]/", $hurl ) ) {
  8. return "[hl=" . $hurl . "]";
  9. }
  10. $hurl = $this->clear_url( $hurl );
  11. return "
  12.  
  13. <iframe id=\"hulkshare-player-embed\" name=\"hulkshare-player-embed\"
  14. src=\"http://www.hulkshare.com/hsPlayer/embed/embed_clean.php?fn=$hulk
  15. &enableDownload=0&enableCover=0&enableAdd=false&bg=undefined&fg=undefined&iconColor=undefined&backColor=undefined&outColor=undefined&overColor=undefined&
  16. textColor=undefined&tintColor=undefined&pid=&type=7&width=100%\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"width:100%;height:160px;\">
  17. </iframe>
  18. ";}
  19. /* End HulkShare Player */


Gdzie
  1. $hurl
to jest to co jest dodawane w tagu bbcode

Teraz chcę zrobić coś takiego:

(IMG:http://i.imgur.com/7BE9Wt2.png)

Czyli chcę w tym moim kodzie z linku wyciągnąć tą część która jest potrzebna do kodu Iframe (w inny sposób nie zadziała player)

Byłbym bardzo wdzięczny gdyby ktoś do tego kodu dopisał zmienną na to. Ja niestety zaczynam prace z PHP i nie do końca umiem te wszyskie zmienne tworzyć
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.09.2025 - 22:33