3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $subject = ' <![CDATA[ Xxx-AV 22194 春奈 フルHD パイパンモデルの中出しレッスン個人撮影会で生性交 PART.2<br /> 春奈<br /> 公開日: 2015-09-20<br /> 再生時間: 00:50:44<br /> サイズ: 1990MB<br /> カテゴリ: AV女優<br /> ジャンル:<br /> キーワード: ドキュメント 美乳 スレンダー 美尻 美脚 その他コスプレ 生挿入 中出し ローター 電気あんま器 完全無修正<br /> <br /> <a href="http://www.imgbabes.com/8csqmlfikk7z/movie_main.jpg.html" target="_blank" class="externalLink" rel="nofollow"><img src="http://t1.imgbabes.com/i/00638/8csqmlfikk7z_t.jpg" class="bbCodeImage LbImage" alt="[&#x200B;IMG]" data-url="http://t1.imgbabes.com/i/00638/8csqmlfikk7z_t.jpg" /></a> <a href="http://www.imgbabes.com/rzcvbduyy3ah/xox0024_01.jpeg.html" target="_blank" class="externalLink" rel="nofollow"><img src="http://t1.imgbabes.com/i/00638/rzcvbduyy3ah_t.jpg" class="bbCodeImage LbImage" alt="[&#x200B;IMG]" data-url="http://t1.imgbabes.com/i/00638/rzcvbduyy3ah_t.jpg" /></a>...<br /> <br /> <a href="https://www.akiba-online.com/threads/hd-1-85g-xxx-av-22194-furuhd-paipanmoderunoshiressunde-part-2.1571604/" class="internalLink">[HD/1.85G] Xxx-AV 22194 春奈 フルHD パイパンモデルの中出しレッスン個人撮影会で生性交 PART.2</a> ]]> '; $content = $subject; $theurl = check_pic($subject);//--------------------------------------------------- //echo $theurl; //echo $theurl['url']; echo '<br />'; echo '<br />'; //echo $theurl['picurl']; //echo $theurl['picurl']; echo $theurl['content']; // myTest('http://c2.staticflickr.com/8/7334/8974569552_450a8e790a_n.jpg'); //$content = str_replace($matches[0][0],$url,$subject); //echo $content; function check_pic($subject) { $pattern = '/(?<=<a href=\")(.*?)(?=\" target)/'; //[^dailyjav] $result = preg_match_all( $pattern, $subject , $matches ); // echo $result; //匹配數 //echo '<br />'; //echo $matches[0][0]; if ($result) { $url= get_pic($matches[0][0]); // get_pic($matches[0][1]); // get_pic($matches[0][2]); //echo $matches[0][0].'hihi'; //global $content; $url2= get_pic($matches[0][1]); $url3= get_pic($matches[0][2]); // get_pic($matches[0][1]); $content = str_replace($matches[0][0],$url,$subject); $content = str_replace($matches[0][1],$url2,$content); $content = str_replace($matches[0][2],$url3,$content); // $content = str_replace($matches[0][2],$url,$subject); //echo $matches[0][0]; echo $url.' 1<br />'; echo $url2.' 2<br />'; echo $url3.' 3<br />'; //存圖 // grab_image($url,'image.jpg'); } //return $url; return array('picurl' => $url, 'content' => $content); } // function get_pic($the_pic_link) { $the_source = file_get_contents($the_pic_link); //$pattern = '/(http:\/\/imgdream.net\/images\/)(.*?)(.jpg)/'; if (strpos($the_pic_link,'imgdream') !== false) { $pattern = '/(http:\/\/(www\.)?imgdream\.net\/images\/)(.*?)(.jpg)/'; $matchme = 0; } elseif (strpos($the_pic_link,'img-365.com') !== false) { $pattern = '/(http:\/\/(www\.)?img-365\.com\/images\/)(.*?)(.jpg)/'; $matchme = 1; } elseif (strpos($the_pic_link,'daily-img.com') !== false) { $pattern = '/(http:\/\/(www\.)?daily-img.com\/images\/)(.*?)(.jpg)/'; $matchme = 1; } elseif (strpos($the_pic_link,'pixroute.com') !== false) { $pattern = '/(http:\/\/(www\.)?)(.*?)(\.jp(e)?g)(?=\")/'; $matchme = 1; } elseif (strpos($the_pic_link,'imgdream.net') !== false) { $pattern = '/((http:\/\/(www\.)?imgdream\.net\/)?images\/)(.*?)(.jp(e)?g)(?=\")/'; $matchme = 0; } elseif (strpos($the_pic_link,'imgserve.net') !== false) { $pattern = '/(http:\/\/(www\.)?)(.*?)(\.jpeg)/'; $matchme = 0; } elseif (strpos($the_pic_link,'imgmega.com') !== false) { $pattern = '/(http:\/\/(www\.)?)(.*?)(.jpg)(?=\")/'; $para = array( 'op' => urlencode('view'), // 'id' => urlencode('r1a5kgl05pwu'), //----------------------ID代表一張圖! 'pre' => urlencode('1'), 'next' => urlencode('Continue to image'), ); $the_source = pic_post($the_pic_link,$para); $matchme = 0; } elseif (strpos($the_pic_link,'imgbabes.com') !== false) { $pattern = '/(http:\/\/(t1\.)?)(.*?)(.jp(e)?g)(?=\")/'; $matchme = 0; $url=$the_pic_link; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_HEADER,false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_COOKIE, "denial=93a7a7e8b5af9f19a6df5e9850f8a64a;"); //Cookie: aff=7949; _ga=GA1.2.1147186056.1442133451; denial=93a7a7e8b5af9f19a6df5e9850f8a64a // curl_setopt($ch, CURLOPT_COOKIEJAR, 'tmpfile.txt'); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $the_source = $temp=curl_exec($ch); //echo $the_source; //htmlspecialchars($the_source); curl_close($ch); //------------------ //affiliate_redirect(); //---------------- } elseif (strpos($the_pic_link,'imageteam.org') !== false) { $pattern = '/(http:\/\/(www\.)?)(.*?)(.jpeg)/'; $matchme = 0; } elseif (strpos($the_pic_link,'erimge.com') !== false) { $pattern = '/(http:\/\/(www\.)?erimge\.com\/)(.*?)(.jpg)/'; $para = array( 'imgContinue' => urlencode('Continue to image'), ); $the_source = pic_post($the_pic_link,$para); $matchme = 0; } elseif (strpos($the_pic_link,'imgbb.net') !== false) { $pattern = '/(http:\/\/(www\.)?)(.*?)(.jp(e)?g)/'; $para = array( 'imgContinue' => urlencode('Continue to image'), ); //op=view&id=2vnhpseirols&pre=1&next=Continue+to+image... //imgContinue=Continue+to+image+...+ $the_source = pic_post($the_pic_link,$para); $matchme = 0; } else { $pattern = '/(http:\/\/(www\.)?)(.*?)(.jpg)/'; $matchme = 0; } $success = preg_match_all($pattern, $the_source, $match); if ($success) { // echo '<img src="'.$match[0][$matchme].'" border=\"0\" alt=\"\" \/>'; // echo '<br />'; $url=$match[0][$matchme]; //echo '<br />'; //echo $url.'<br/>'; // echo '<br />'.$url.'hihi'; } return $url; } //function get pic function affiliate_redirect() { // it's possible to use 'if( !empty( $_GET['affid']) )' if( isset($_GET['cookie']) && '' != $_GET['cookie'] ) { if( empty($_COOKIE['cookie']) ) setcookie('denial', 'denial=93a7a7e8b5af9f19a6df5e9850f8a64a', time()+2592000, '/'); header('Location: '.$url); exit; } } function myTest($url) { $image_url = $url; $ch = curl_init(); $timeout = 0; curl_setopt ($ch, CURLOPT_URL, $image_url); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); // Getting binary data curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $image = curl_exec($ch); curl_close($ch); // output to browser header("Content-type: image/jpeg"); print $image; } //------------------------------------------------------------------------pic_post() function pic_post($theposturl,$para) { $url = $theposturl; $fields = $para; $fields_string=''; //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection //$ch = curl_init(); $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //execute post $result = curl_exec($ch); //close connection curl_close($ch); return $result; } //------------------------------------------------------------------------pic_post() ?>
Output for 7.0.20, 7.1.5 - 7.2.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/fuHAH on line 87 Warning: file_get_contents(http://www.imgbabes.com/8csqmlfikk7z/movie_main.jpg.html): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/fuHAH on line 87 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/fuHAH:148 Stack trace: #0 /in/fuHAH(50): get_pic('http://www.imgb...') #1 /in/fuHAH(13): check_pic('\n<![CDATA[\nXxx-...') #2 {main} thrown in /in/fuHAH on line 148
Process exited with code 255.
Output for 7.0.0 - 7.0.8, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/fuHAH on line 87 Warning: file_get_contents(http://www.imgbabes.com/8csqmlfikk7z/movie_main.jpg.html): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/fuHAH on line 87 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/fuHAH:148 Stack trace: #0 /in/fuHAH(50): get_pic('http://www.imgb...') #1 /in/fuHAH(13): check_pic('\n<![CDATA[\nXxx-...') #2 {main} thrown in /in/fuHAH on line 148
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/fuHAH on line 87 Warning: file_get_contents(http://www.imgbabes.com/8csqmlfikk7z/movie_main.jpg.html): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/fuHAH on line 87 Fatal error: Call to undefined function curl_init() in /in/fuHAH on line 148
Process exited with code 255.