Skip to content
WJunction - Webmaster Forum

Primewire.ag PHP Link Extractor

Status
Not open for further replies.

Tango

Moderator
Staff member
4,125
2009
1,764
21,785
I wrote this code for someone quickly, Its not pretty but it doesn't need to be.

I will put it here in case it helps anyone.

URL format to put in box
Code:
http://www.primewire*****watch-2790123-Ember-online-free

output
CobjgrU.png



PHP:
<?php
    echo'<form method="post" action="">URL <input type="text" name="site_url" > <input type="submit" value="GET"/></form><br/><br/>';
    if(!empty($_POST) && filter_var($_POST['site_url'], FILTER_VALIDATE_URL) == true)
        {
        $content = file_get_contents(trim($_POST['site_url']));
        if(preg_match('/tt([0-9]{5,10})/', $content, $m) && preg_match('/title="Watch (.*) online">/', $content, $t))
            {
			echo $t[1]."<br/>";
            echo  "http://www.imdb.com/title/tt".$m[1]."/<br/><br/>";
            $dom = new DOMDocument();
            $internalErrors = libxml_use_internal_errors(true);
            $dom->loadHTML($content);
            $divs = $dom->getElementsByTagName("span");

            // Add words here that are contained in URLs you dont want shown
            $ignore = array("qertewrt","amazonaw","1172934");

            foreach($divs as $div)
                {
                $cl = $div->getAttribute("class");
                if ($cl == "movie_version_link")
                    {
                    $hrefs = $div->getElementsByTagName("a");
                    foreach ($hrefs as $href)
                    $p = parse_url($href->getAttribute("href"));
                    $s = explode('&', $p['query']);
                    $ff = base64_decode(str_replace("url=", "", $s[1]));
                    if (strlen(str_replace($ignore, '', $ff)) == strlen($ff))
					echo '<a href="'.$ff.'" target="_blank">'.$ff.'</a><br/>';
                    }
                }
            }
        }
?>
 
Last edited:

11 comments

Nice and clean code.

You can add also this domain for remove advertisements:

Code:
9c40a04e9732e6a6.com

Right now around 5,5k movies uses this link for ads.

Regards,
p.team
 
Hey Gavo,

sounds good.

We've also a list of all dead hosts that still exist in primewire, please let us know if you're interested for improve your script.

Regards,
p.team
 
Good update Gavo,

with this array is very easy to exclude unwanted hosts and any other future ads.

We'll provide here a complete hosts exclusion that contain: scam domains, dead domains, domains that have less that 5k daily views. Most of this domains are still present in many primewire links.

Code:
$ignore = array("qertewrt","amazonaw","1172934","filenuke","promptfile","briskfile","sharesix","vid.ag","movdivx.com","divxme.com","wholecloud.net","zalaa.com","wholecloud.net","zalaa.com","vidlockers.ag","uploadc.com","tubemotion.com","promptfile.com","hulu.com","briskfile.com","56.com","vodlocker.com","vidspot.net","vidbull.com","thefile.me","stagevu.com","sharesix.com","sharerepo.com","realvid.net","noslocker.com","playedto.me","neodrive.co","bestreams.net","gorillavid.com","tudou.com","movie4all.co");

Regards,
p.team
 
Good update Gavo,

with this array is very easy to exclude unwanted hosts and any other future ads.

We'll provide here a complete hosts exclusion that contain: scam domains, dead domains, domains that have less that 5k daily views. Most of this domains are still present in many primewire links.

Code:
$ignore = array("qertewrt","amazonaw","1172934","filenuke","promptfile","briskfile","sharesix","vid.ag","movdivx.com","divxme.com","wholecloud.net","zalaa.com","wholecloud.net","zalaa.com","vidlockers.ag","uploadc.com","tubemotion.com","promptfile.com","hulu.com","briskfile.com","56.com","vodlocker.com","vidspot.net","vidbull.com","thefile.me","stagevu.com","sharesix.com","sharerepo.com","realvid.net","noslocker.com","playedto.me","neodrive.co","bestreams.net","gorillavid.com","tudou.com","movie4all.co");

Regards,
p.team


Thanks, anyone can update the line if they use it, I wont add it above to keep the code short.

I updated it to show the title of the post.
 
Status
Not open for further replies.

About the author

Tango
Moderator · Joined
4,125
Messages
1,764
Reactions
113
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom