Activity Stream
48,140 MEMBERS
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On Google+
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
    whats the php-imdb link for? imdbphp is better

    If you use Yawns leecher script a lot of the time you have to copy/paste the nfo from the post and it works with the sites that are leeched, so this is just to save time.

    its 14 lines of code and im not good with coding, its not ment to be a full on converter

    I just posted it to help people not to get bashed

    just seen your post, it isnt working
    Warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 20 in /var/www/vhosts/xxxxxx/nfo.php on line 7

  2.   Sponsored Links

    Respected Developer
    Ok, that would be a bug in the regular expression engine since that's a valid regex. If I move the escaped slash to the front it magically works.

    PHP Code: 
    echo "<form method='post' action=''>"
    ."<textarea id='nfo' name='nfo' rows='15' cols='80' style='width: 100%'></textarea>"
    ."<input type='submit' name='go' value='Remove Shite' />"
    if (isset(
    $_POST['go'])) {
    $cleaned preg_replace('/([^\\\w\d\s\-:.,\/]+)/'''html_entity_decode($_POST['nfo']));
    // you don't need to do this in this case
     //$cleaned = preg_replace('/[ ]*(\r{0,1}\n)[ ]*/', '$1', $cleaned);
    $cleaned preg_replace('/(ripper|supplier|genre|release date|theater date|source|aspect ratio|video format|video resolution|video bitrate|audio bitrate|runtime|rating|language|subtitle|substitle|dvd date|audio format|video aspect|video length|theatre date|framerate|video codec|audio codec|dir name|artist|album|year|retail|label|encoder|quality|grabber|ripped|video fps|imdb rating)/i''[b]$1[/b]'$cleaned); 
    I can't believe this language is still as buggy as it was 6 years ago.

    I did try to use html_entity_decode, but got the same result as you get with that code.

    the page is filled with numbers..
    eg. 9604960496009600960096049604 so I tried using regex to remove them, then clean up whitespace, but the results wernt reliable so i ended up with the code i posted.

    Respected Developer
    That would be a charset issue. Try:
    PHP Code: 
    html_entity_decode($_POST['nfo'], ENT_COMPAT'UTF-8'
    Or one of the other charsets:

    The results are worse using that.

    I did try using html_entity_decode with charsets and lots of different methods of cleaning the code using regex before dumping it & trying a different method and seeming im only using the code for a few NFO sites it works well enough for me

    eg. i want to clean this up and post it on a site, the script cleans it up

    Respected Developer
    See this is why after a while I really started hating PHP. It's a great language for the job but it's filled with tiny issues, bugs and design flaws. Unbelievable.

    This thread is only a few lines of code and we already found:
    - there's at least one bug in the regex parser
    - the HTML decoder is flawed or has poor error compensating (or unsupported encoding)

    All hail C#/.NET.

    I have updated the 1st post with a working example, and stated that it will only work with nfo's for sites used by Yawns leecher.

    I think that's the confusion, i didn't make this to work with full ascii nfos only for the sites i needed

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Forums Post
    By V!P in forum Webmaster Discussion
    Replies: 0
    Last Post: 25th Oct 2012, 12:43 PM
  2. Forums to post
    By TheA10tion in forum Forum and DDL Discussion
    Replies: 1
    Last Post: 4th Jul 2011, 12:58 PM
  3. One post to many Forums?
    By dilll1990 in forum Web Application/Script Support
    Replies: 7
    Last Post: 17th Feb 2011, 06:52 AM
  4. looking for forums to post
    By StarTech in forum Community Cooperative
    Replies: 37
    Last Post: 8th Sep 2009, 06:29 PM

Tags for this Thread