How to get id from this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jgutz
    replied
    Originally posted by razzbee View Post
    u can still use the first function do it this way...
    Code:
    Preg_replace("/^(http:\/\/www\.)?(4 s h a r e d \ . c o m \ / a u d i o \ / ) ( . + ) \ / ( . + ) $/",$3,$link);
    Change the $3 to %3 if it fails.
    Pardon me for mistakes im on mobile
    Tnx, I'll save it for back up :D

    Leave a comment:


  • razzbee
    replied
    u can still use the first function do it this way...
    Code:
    Preg_replace("/^(http:\/\/www\.)?(4 s h a r e d \ . c o m \ / a u d i o \ / ) ( . + ) \ / ( . + ) $/",$3,$link);
    Change the $3 to %3 if it fails.
    Pardon me for mistakes im on mobile

    Leave a comment:


  • Jgutz
    replied
    tnx also @gumslone & @frosty 4 the info..by the way I used the explode code

    Leave a comment:


  • frostymarvelous
    replied
    You're welcome. PHP: ereg - Manual

    Leave a comment:


  • razzbee
    replied
    @gumslone and frosty,thanx for the info....nice

    Leave a comment:


  • GumSlone
    replied
    Originally posted by razzbee View Post
    well ,ereg is for native php coding whiles the preg is borrowed from perl (pcre).no difference but a slight change in rule.
    PHP: ereg - Manual
    This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

    Leave a comment:


  • razzbee
    replied
    well ,ereg is for native php coding whiles the preg is borrowed from perl (pcre).no difference but a slight change in rule.

    Leave a comment:


  • frostymarvelous
    replied
    Ereg is deprecated. Change to preg.

    Leave a comment:


  • Jgutz
    replied
    It works! Thanks hitted

    Leave a comment:


  • Jgutz
    replied
    I will try that,. Thanks a lot

    Leave a comment:


  • razzbee
    replied
    $link = I.Y.A.Z - Love.mp3 - 4shared.com - online file sharing and storage - download
    use this
    Code:
    $link=ereg_replace("(http:\/\/www\.4shared\.com\/audio\/)(.+)\/(.+)$",\\2,$link);
    echo $link;
    
    or use this
    
    $link=explode("/",$link);
    
    $link=$link[4];

    Leave a comment:


  • Jgutz
    started a topic How to get id from this?

    How to get id from this?

    Im not good in php so please someone teach me how to get id from this code
    PHP Code:
    $link http://www.4shared.com/audio/0Po_BkGJ/IYAZ_-_Love.htm; 
    Using php? I dont now if thats right, I just want to get the (0Po_BkGJ)
    Please someone tell me how
Working...
X