Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $content=file_get_contents('https://www.youtube.com/user/Fletcher2008/videos');
- $content=preg_replace('/[s]+/',' ',$content);
- $content=preg_replace('/"/','',$content);
- $content=preg_replace('/href=/watch?v=/',"n",$content);
- $content=preg_replace('/<(span|img)[^>]*>/','',$content);
- $content=preg_replace('/</(span|img)>/','',$content);
- $content=preg_replace('/[s]*class=[^>^n]*>/','>',$content);
- $content=preg_replace('/>[s]*/','>',$content);
- $content=preg_replace('/[s]*</','<',$content);
- $content=preg_replace('/<button.*/','',$content);
- $content=preg_replace('/></a>/','','',$content);
- $content=preg_replace('/</a>.*/','',$content);
- $lines = preg_split('/n/', $content);
- $count=0;
- foreach($lines as $line){
- if($count==0) {
- $count=1;
- } else if($count==1) {
- $sql.="('".$line."',";
- $count=2;
- } else if($count==2) {
- $line=preg_replace('/^[^>]*>/','',$line);
- $sql.="'".$line."'),n";
- $count=1;
- echo $line."<br>";
- }
- }
- ?>
- <?php
- $content=file_get_contents('https://www.youtube.com/user/Fletcher2008/videos');
- if (preg_match_all('%<h3 class="yt-lockup-title"><a[^>]*href="([^"]+)"[^>]*>([^<]+)%iu', $content, $matches))
- {
- header('Content-type: text/html; charset=utf-8');
- $count = count($matches[0]);
- $i = 0;
- for ($i = 0; $i < $count; $i++)
- {
- echo htmlspecialchars($matches[1][$i], ENT_QUOTES, 'UTF-8');
- echo ' --- ';
- echo htmlspecialchars($matches[2][$i], ENT_QUOTES, 'UTF-8');
- echo "<br>n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement