Buying Quick $6 for javascript to php

Discussion in 'Programming' started by believer1984, Feb 2, 2010.

  1. #1
    http://www.animeseason.com/naruto-shippuuden-episode-143/
    I need to decode the embed code on that page with php.

    this is the escapeall() code:
    function escapeall(str){return str.replace(/[A-Z]/g,'');}
    Code (markup):
    basically i need that in PHP.
    I need the answer quick, so first come first served.

    will only pay if it fixes my problem.

    MSN:
    PayPal only.

    Regards.
     
    believer1984, Feb 2, 2010 IP
  2. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Hi,
    If I understood right:
    in php is:
    
    function escapeall($str){
    return preg_replace(/[A-Z]/,'',$str);
    }
    
    PHP:
    Regards,
    Nick
    :)
     
    koko5, Feb 2, 2010 IP
  3. believer1984

    believer1984 Peon

    Messages:
    1,544
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    will try now. if it works, you will get the $6
     
    believer1984, Feb 2, 2010 IP
  4. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    OK, Thanks!
    If you need case insensitive function:
    javascript
    
    function escapeall(str){return str.replace(/[A-Z]/ig,'');} 
    
    Code (markup):
    php
    
    function escapeall($str){
    return preg_replace('/[a-z]/i','',$str);
    }
    
    PHP:
    Regards,
    Nick
    p.p. : difference is i modifiers.
    Edit: Oh, I forgor '' (writing in forum directly) -> '/[a-z]/i'
     
    Last edited: Feb 2, 2010
    koko5, Feb 2, 2010 IP
  5. believer1984

    believer1984 Peon

    Messages:
    1,544
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Not quite, but i changed it to this and it worked:
    function escapeall($str){
    return preg_replace("/[A-Z]/",'',$str);
    }
    PHP:
    (Notice you forgot the quotation marks for "/[A-Z]/")

    Well it works so I'll PM you now. :)
     
    believer1984, Feb 2, 2010 IP