Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: file_get_contents($url): failed to open stream: No such file or directory in #4

Open
extremlymtorrents opened this issue May 12, 2024 · 2 comments

Comments

@extremlymtorrents
Copy link

hello i have a error code after 1 year of usage

Warning: file_get_contents($url): failed to open stream: No such file or directory in search.php on line 108

@extremlymtorrents
Copy link
Author

line 108 is $data = json_decode(
file_get_contents('$url', false, $context)
);

<?php

    if (isset($_GET['word'])) { $search  = $_GET["word"];
    $url = "https://1337x.to/search/".$search."/".$page1."/";
	$context = stream_context_create([ 
    'http'=> [ 
        'method'=> 'GET', 
        'user_agent'=> $_SERVER['HTTP_USER_AGENT'] 
    ]
]); 
$data = json_decode(
     file_get_contents('$url', false, $context)
);
	
    //echo $raw;
    $table_making = '<table class="xtrz" width="1135px" cellspacing="0" cellpadding="8" align="center"   ><tbody><tr><td class="ttable_head">Results</td><td class="ttable_head">Seeds</td><td class="ttable_head">Leeches</td><td class="ttable_head">Date Added</td><td class="ttable_head">Size</td><td class="ttable_head">Uloadeder</td>';
    echo $table_making;
    $re = '/<tbody>(.*?)<\/tbody>/ms';
    preg_match_all($re, $raw, $matches, PREG_SET_ORDER, 0);
    // echo $matches[0][1];
    //$result = str_replace('</tr>','</tr><br>',$matches[0][1]);
    $re01 = '/<i class="flaticon-message"><\/i>.*?<\/span>/m';
    $re02 = '/<span class="seeds">.*?<\/span>/m';
    $result = @str_replace('<a href="/torrent/','<a href="magnet_link.php?link=',$matches[0][1]);
    $result = preg_replace($re01, '', $result);
    $result = preg_replace($re02, '', $result);
    echo $result;
    }
 ?>

@extremlymtorrents
Copy link
Author

Any luck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant