<?php
function getrayfile( $url )
{
$dydb = file_get_contents( $url );
$dyurls = fetch_match_contents( "<div class=\"btn_indown_zh-cn\">", "</div>", $dydb );
$dyurls = fetch_match_contents( "<a href=\"", "\">", $dyurls );
$dydb = file_get_contents( $dyurls );
$dyrayfile=fetch_match_contents( "downloads_url", "']", $dydb );
$dyok = str_replace( " = ['", "", $dyrayfile );
if ( $dyok != "" )
{
$dygdfgdqs = str_replace( "zh-cn/download", "3838/zh-cn/preview", $dyok );
$dygdklghgqs = split( "/", $dygdfgdqs );
$dyggqdklshg = str_replace( ".", "/", $dygdklghgqs[count( $dygdklghgqs ) - 1] );
$dygdkhlsg = split( "/", $dyggqdklshg );
$dygdfgdqs = str_replace( $dygdklghgqs[count( $dygdklghgqs ) - 1], "preview.".$dygdkhlsg[1], $dygdfgdqs );
return $dygdfgdqs;
}
return "";
}
function fetch_match_contents( $dykgdlsrrr, $dykgddelrrr, $dykgdlshigdb )
{
$dykgdlsrrr = change_match_string( $dykgdlsrrr );
$dykgddelrrr = change_match_string( $dykgddelrrr );
if ( @preg_match( "/".$dykgdlsrrr."(.*?){$dykgddelrrr}/i", $dykgdlshigdb, $dyqjvgdqss ) )
{
return $dyqjvgdqss[1];
}
return "";
}
function change_match_string( $dykgdkggg )
{
$dykggdkggw = array( "/", "\$" );
$dykggdkxxw = array( "\\/", "\$" );
$dykgdkggg = str_replace( $dykggdkggw, $dykggdkxxw, $dykgdkggg );
return $dykgdkggg;
}
echo getrayfile("http://www.rayfile.com/zh-cn/files/678fcc51-9ea4-11de-8490-0014221b798a/");
?> |