Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Fixing WordPress
    In reply to: help with code
    Thread Starter sava94

    (@sava94)

    Grabber ( parser ) this is the code which pulls any needed information from other sites .

    Here is an example code:

    <?php
    function parse($p1, $p2, $p3) {
    $num1 = strpos($p1, $p2) ;
    if ($num1 === false) return 0;
    $num2 = substr($p1, $num1);
    return strip_tags(substr($num2, 0, strpos($num2, $p3)));
    }
    
    $String = file_get_contents('https://wordpress.org/');
    echo parse($String, '<h5>', '</div>');
    ?>

    Here is some example output:

    WordPress 4.4.1 Security and Maintenance Release WordPress 4.4.1 is now available. This is a security release for all previous versions and we strongly encourage you to update your sites immediately. WordPress versions 4.4 and earlier are affected by a cross-site scripting vulnerability that could allow a site to be compromised. This was reported by Crtc4L. There were also several non-security bug fixes: Emoji […]

    can’t make a conclusion in sidebar.php . In each record

    tried to quote the code shows error.
    tell me how this code worked, using quotes
    I’m sorry I’m writing through a translator

    Forum: Fixing WordPress
    In reply to: help with code
    Thread Starter sava94

    (@sava94)

    HI Jose Castaneda!
    I’m trying to connect to each individual post grabber , which will be located in the right column

Viewing 2 replies - 1 through 2 (of 2 total)