phpguru Posted August 29, 2012 Report Posted August 29, 2012 <?php function curl( $url ) { if ( in_array( "curl", get_loaded_extensions() ) ) { $ch = curl_init() ; $array = array( CURLOPT_URL => $url, CURLOPT_HEADER => 0, CURLOPT_FRESH_CONNECT => 1, CURLOPT_RETURNTRANSFER => 1 ) ; curl_setopt_array( $ch, $array ) ; $result = curl_exec( $ch ) ; curl_close( $ch ) ; return $result ; } else { return @file_get_contents( $url ) ; } } $curl = curl( "http://inbuzunar.mobi/loto.php" ) ; $grab = explode( '<body>', $curl ) ; $rest = explode( '<div class="footer_menu">', $grab[1] ) ; $show = preg_replace( array( "/<div class=\"ad_menu\">(.+?)<\/div>/si", "/<div class=\"nolink\">(.+?)<\/div>/si" ), array( "", "<p>$1</p>" ), $rest[0] ) ; echo $show . "\n" ; ?> DEMO: http://inbuzunar.mobi/loto.php 1 Pasnic si..simplu
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now