Jump to content

simple fix (i think)


happyturtle

Recommended Posts

function getUrls($string) {
    $regex = '/http?\:\/\/[^\" ]+/i';
    preg_match_all($regex, $string, $matches);
    return ($matches[0]);
}

$urls = getUrls($_POST["code"]);

foreach($urls as $url) {
    echo $url.'<br />';
}

 

The code above get all links.

I want it to get only link with megaupload.com in them.

Is that possible?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/192696-simple-fix-i-think/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.