本文整理汇总了PHP中defport函数的典型用法代码示例。如果您正苦于以下问题:PHP defport函数的具体用法?PHP defport怎么用?PHP defport使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了defport函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetPage
public function GetPage($link, $cookie = 0, $post = 0, $referer = 0, $auth = 0, $XMLRequest = 0)
{
global $options;
if (!$referer) {
global $Referer;
$referer = $Referer;
}
$cURL = $options['use_curl'] && extension_loaded('curl') && function_exists('curl_init') && function_exists('curl_exec') ? true : false;
$Url = parse_url(trim($link));
if ($Url['scheme'] == 'https') {
$chttps = false;
if ($cURL) {
$cV = curl_version();
if (in_array('https', $cV['protocols'], true)) {
$chttps = true;
}
}
if (!extension_loaded('openssl') && !$chttps) {
html_error('This server doesn\'t support https connections.');
} elseif (!$chttps) {
$cURL = false;
}
}
if ($cURL) {
if ($XMLRequest) {
$referer .= "\r\nX-Requested-With: XMLHttpRequest";
}
$page = cURL($link, $cookie, $post, $referer, $auth);
} else {
global $pauth;
$page = geturl($Url['host'], defport($Url), $Url['path'] . (!empty($Url['query']) ? '?' . $Url['query'] : ''), $referer, $cookie, $post, 0, !empty($_GET['proxy']) ? $_GET['proxy'] : '', $pauth, $auth, $Url['scheme'], 0, $XMLRequest);
is_page($page);
}
return $page;
}
示例2: GetPage
public function GetPage($link, $cookie = 0, $post = 0, $referer = 0, $auth = 0, $XMLRequest = 0)
{
if (!$referer && !empty($GLOBALS['Referer'])) {
$referer = $GLOBALS['Referer'];
}
$cURL = $GLOBALS['options']['use_curl'] && extension_loaded('curl') && function_exists('curl_init') && function_exists('curl_exec') ? true : false;
$Url = parse_url(trim($link));
if (strtolower($Url['scheme']) == 'https') {
$chttps = false;
if ($cURL) {
$cV = curl_version();
if (in_array('https', $cV['protocols'], true)) {
$chttps = true;
}
}
if (!extension_loaded('openssl') && !$chttps) {
html_error('You need to install/enable PHP\'s OpenSSL extension to support HTTPS connections.');
} elseif (!$chttps) {
$cURL = false;
}
}
if ($cURL) {
if ($XMLRequest) {
$referer .= "\r\nX-Requested-With: XMLHttpRequest";
}
$page = cURL($link, $cookie, $post, $referer, $auth);
} else {
global $pauth;
$page = geturl($Url['host'], defport($Url), $Url['path'] . (!empty($Url['query']) ? '?' . $Url['query'] : ''), $referer, $cookie, $post, 0, !empty($_GET['proxy']) ? $_GET['proxy'] : '', $pauth, $auth, $Url['scheme'], 0, $XMLRequest);
is_page($page);
}
return $page;
}
示例3: putfile
function putfile($host, $port, $url, $referer, $cookie, $file, $filename, $proxy = 0, $pauth = 0, $upagent = 0, $scheme = 'http')
{
global $nn, $lastError, $fp, $fs;
if (empty($upagent)) {
$upagent = rl_UserAgent;
}
$scheme = strtolower("{$scheme}://");
if (!is_readable($file)) {
$lastError = sprintf(lang(65), $file);
return FALSE;
}
$fileSize = getSize($file);
if (!empty($cookie)) {
if (is_array($cookie)) {
$cookies = count($cookie) > 0 ? CookiesToStr($cookie) : 0;
} else {
$cookies = trim($cookie);
}
}
if ($scheme == 'https://') {
if (!extension_loaded('openssl')) {
html_error('You need to install/enable PHP\'s OpenSSL extension to support uploading via HTTPS.');
}
$scheme = 'tls://';
if ($port == 0 || $port == 80) {
$port = 443;
}
}
if (!empty($referer) && ($pos = strpos("\r\n", $referer)) !== 0) {
$origin = parse_url($pos ? substr($referer, 0, $pos) : $referer);
$origin = strtolower($origin['scheme']) . '://' . strtolower($origin['host']) . (!empty($origin['port']) && $origin['port'] != defport(array('scheme' => $origin['scheme'])) ? ':' . $origin['port'] : '');
} else {
$origin = ($scheme == 'tls://' ? 'https://' : $scheme) . $host . ($port != 80 && ($scheme != 'tls://' || $port != 443) ? ':' . $port : '');
}
if ($proxy) {
list($proxyHost, $proxyPort) = explode(':', $proxy, 2);
$host = $host . ($port != 80 && ($scheme != 'tls://' || $port != 443) ? ':' . $port : '');
$url = "{$scheme}{$host}{$url}";
}
if ($scheme != 'tls://') {
$scheme = '';
}
$request = array();
$request[] = 'PUT ' . str_replace(' ', '%20', $url) . ' HTTP/1.1';
$request[] = "Host: {$host}";
$request[] = "User-Agent: {$upagent}";
$request[] = 'Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1';
$request[] = 'Accept-Language: en-US,en;q=0.9';
$request[] = 'Accept-Charset: utf-8,windows-1251;q=0.7,*;q=0.7';
if (!empty($referer)) {
$request[] = "Referer: {$referer}";
}
if (!empty($cookies)) {
$request[] = "Cookie: {$cookies}";
}
if (!empty($pauth)) {
$request[] = "Proxy-Authorization: Basic {$pauth}";
}
$request[] = "X-File-Name: {$filename}";
$request[] = "X-File-Size: {$fileSize}";
$request[] = "Origin: {$origin}";
$request[] = 'Content-Disposition: attachment';
$request[] = 'Content-Type: multipart/form-data';
$request[] = "Content-Length: {$fileSize}";
$request[] = 'Connection: Close';
$request = implode($nn, $request) . $nn . $nn;
$errno = 0;
$errstr = '';
$hosts = (!empty($proxyHost) ? $scheme . $proxyHost : $scheme . $host) . ':' . (!empty($proxyPort) ? $proxyPort : $port);
$fp = @stream_socket_client($hosts, $errno, $errstr, 120, STREAM_CLIENT_CONNECT);
if (!$fp) {
if (!function_exists('stream_socket_client')) {
html_error('[ERROR] stream_socket_client() is disabled.');
}
$dis_host = !empty($proxyHost) ? $proxyHost : $host;
$dis_port = !empty($proxyPort) ? $proxyPort : $port;
html_error(sprintf(lang(88), $dis_host, $dis_port));
}
if ($errno || $errstr) {
$lastError = $errstr;
return false;
}
if ($proxy) {
echo '<p>' . sprintf(lang(89), $proxyHost, $proxyPort) . '<br />PUT: <b>' . htmlspecialchars($url) . "</b>...<br />\n";
} else {
echo '<p>' . sprintf(lang(90), $host, $port) . '</p>';
}
echo lang(104) . ' <b>' . htmlspecialchars($filename) . '</b>, ' . lang(56) . ' <b>' . bytesToKbOrMbOrGb($fileSize) . '</b>...<br />';
$GLOBALS['id'] = md5(time() * rand(0, 10));
require TEMPLATE_DIR . '/uploadui.php';
flush();
$timeStart = microtime(true);
$chunkSize = GetChunkSize($fileSize);
fwrite($fp, $request);
fflush($fp);
$fs = fopen($file, 'r');
$totalsend = $time = $lastChunkTime = 0;
while (!feof($fs) && !$errno && !$errstr) {
$data = fread($fs, $chunkSize);
if ($data === false) {
//.........这里部分代码省略.........
示例4: geturl
$page = geturl("www.upfordown.com", 80, "/myfiles", "http://www.upfordown.com/", $cookies, 0, 0, "");
is_page($page);
is_notpresent($page, 'HTTP/1.1 200 OK', 'Error logging in - are your logins correct?Second');
?>
<script>document.getElementById('login').style.display='none';</script>
<div id=info width=100% align=center>Retrive upload ID</div>
<?php
$ref = 'http://www.upfordown.com/upload';
$Url = parse_url($ref);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$upAPC = cut_str($page, 'name="APC_UPLOAD_PROGRESS" value="', '"');
$post['APC_UPLOAD_PROGRESS'] = $upAPC;
$post['action'] = "upload";
$post['upload_to'] = "";
$post['create_img_tags'] = "1";
$post['thumbnail_size'] = "small";
$post['upload_to'] = "";
$url = parse_url('http://www.upfordown.com/upload.php');
?>
<script>document.getElementById('info').style.display='none';</script>
<?php
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 'http://www.upfordown.com/', $cookies, $post, $lfile, $lname, "file0");
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
$ddl = cut_str($upfiles, 'http://www.upfordown.com/files/download/', "',");
$download_link = 'http://www.upfordown.com/files/download/' . $ddl;
}
// Made by Baking 09/07/2009 18:07
示例5: geturl
$ref = 'http://www.fast-load.net/';
$page = geturl("www.fast-load.net", 80, "/", "", 0, 0, 0, "");
is_page($page);
// $cook = trim(cut_str($page,"Cookie:",";"));
$ifurl = cut_str($page, '<iframe', '</iframe>');
$ifurl = cut_str($ifurl, 'src="', '"');
if (!$ifurl) {
html_error('Error get iframe url');
}
$Url = parse_url($ifurl);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$servid = cut_str($page, 'name="serverid" value="', '"');
$post['user'] = '';
$post['password'] = '';
$post['ref'] = '';
$post['serverid'] = $servid ? $servid : '21';
?>
<script>document.getElementById('info').style.display='none';</script>
<?php
$upfiles = upfile($Url["host"], defport($Url), "/upload.php", "", 0, $post, $lfile, $lname, "gfile");
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
// is_notpresent($upfiles,"ok","Error Upload File!".$upfiles);
$tmp = cut_str($upfiles, "Download", true);
$download_link = cut_str($tmp, 'value="', '"');
$tmp = cut_str($tmp, "Delete", true);
$delete_link = cut_str($tmp, 'value="', '"');
// sert 19.07.2008
示例6: implode
$cookie = $temp[1];
$cookies = implode(';', $cookie);
?>
<script>document.getElementById('login').style.display='none';</script>
<div id=info width=100% align=center>Retrive upload ID</div>
<?php
$ref = 'http://www.cinshare.com/upload/local';
$Url = parse_url($ref);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 'http://www.cinshare.com/', $cookies, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$rndid = cut_str($page, 'var fid = genRandId(', ')');
$uid = cut_str($page, '<input id="uid" type="hidden" value="', '"');
$ID = GRC();
$servup = cut_str($page, "var curServer = '", "'");
$post['Filename'] = $lname;
$post['Upload'] = 'Submit Query';
$url = parse_url($servup . "/upload/process/" . $ID . "/" . $uid);
$upagent = "Shockwave Flash";
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 0, 0, $post, $lfile, $lname, "Filedata", 0, $upagent);
is_page($upfiles);
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
$Url = parse_url('http://www.cinshare.com/upload/getLinks/' . $ID);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 'http://www.cinshare.com/', 0, 0, 0, $_GET["proxy"], $pauth);
$ddl = cut_str($page, 'value="http://www.cinshare.com/videos/watch/', '"');
$download_link = "http://www.cinshare.com/videos/watch/" . $ddl;
$delete_link = "http://www.cinshare.com/files/delete/" . $ID;
}
// Made by Baking 30/07/2009 16:55
// Fixed by Baking 09/11/2009 12:42
示例7: parse_url
<?php
$ref = 'http://ugotfile.com/';
$Url = parse_url($ref);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
?>
<script>document.getElementById('login').style.display='none';</script>
<div id=info width=100% align=center>Retrive upload ID</div>
<?php
$upload_srv = cut_str($page, 'uploadServer = "', '"');
$upload_sid = cut_str($page, 'upload_url: uploadServer+"/upload/web?PHPSESSID=', '"');
$upload_form = $upload_srv . "/upload/web?PHPSESSID=" . $upload_sid;
$url = parse_url($upload_form);
$post['Filename'] = $lname;
$post['destinationFolder'] = 'You must login to save files to your destination folder';
$post['Upload'] = 'Submit Query';
?>
<script>document.getElementById('info').style.display='none';</script>
<?php
$upagent = "Shockwave Flash";
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 0, $cookies, $post, $lfile, $lname, "Filedata", 0, $upagent);
is_page($upfiles);
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
$ddl = cut_str($upfiles, "/file", '"');
$del = cut_str($upfiles, '?remove=', '"');
$ddl1 = 'http://ugotfile.com/file' . str_replace('\\', "", $ddl);
$download_link = $ddl1;
$delete_link = $ddl1 . '?remove=' . $del;
// Made by Baking 15/12/2009 17:42
示例8: html_error
html_error("Error: Cannot find session value.", 0);
}
$post['upload_type'] = "file";
$post['sess_id'] = $xfss;
$post['srv_tmp_url'] = cut_str($page, 'name="srv_tmp_url" value="', '"');
$post['ut'] = "file";
$post['link_rcpt'] = "";
$post['link_pass'] = "";
$post['tos'] = 1;
$post['submit_btn'] = " ";
$up_url = "{$up[1]}/?upload_id={$uid}&js_on=1&utype=reg&upload_type=file";
?>
<script type="text/javascript">document.getElementById('info').style.display='none';</script>
<?php
$url = parse_url($up_url);
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), "http://filedino.com/", $cookie, $post, $lfile, $lname, "file_0");
?>
<script type="text/javascript">document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
$post = array();
$post['op'] = "upload_result";
$post['fn'] = cut_str($upfiles, " name='fn'>", "<");
$post['st'] = "OK";
$page = geturl("www.filedino.com", 80, "/", $up_url, $cookie, $post, 0, $_GET["proxy"], $pauth);
is_page($page);
if (preg_match('@(http://(www\\.)?filedino\\.com/\\w+)\\?killcode=\\w+@i', $page, $lnk)) {
$download_link = $lnk[1];
$delete_link = $lnk[0];
} else {
html_error("Download link not found.", 0);
示例9: parse_url
// $post["zshare"]='on';
$post["netload"] = 'on';
// $post["easyshare"]='on';
$post["loadto"] = 'on';
$post["rapidshare"] = 'on';
$post["mediafire"] = 'on';
$post["zippyshare"] = 'on';
$post["megashare"] = 'on';
$url = parse_url($ref . 'cgi/ubr_upload.pl?upload_id=' . $uid);
$upfiles = upfile($url["host"], $url["port"] ? $url["port"] : 80, $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), $ref, 0, $post, $lfile, $lname, "upfile_0");
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<div id=final width=100% align=center>Get final code</div>
<?php
is_page($upfiles);
$finish_url = trim(cut_str($upfiles, 'Location:', "\n"));
if (!$finish_url) {
html_error('Error get location');
}
$Url = parse_url($finish_url);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $ref, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$tmp = cut_str($page, 'link is: <a href="', '">');
if (!$tmp) {
html_error('Error get finish url');
}
$download_link = $ref . $tmp;
?>
<script>document.getElementById('final').style.display='none';</script>
<?php
// sert 28.02.2009 - by pL413R - www.ultrashare.info
示例10: parse_url
$url = parse_url($url_action . $ids);
?>
<script>document.getElementById('info').style.innerHTML='Uploading...';</script>
<?php
$upfiles = upfile($url["host"], $url["port"] ? $url["port"] : 80, $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), "http://uploadbox.com/?ac=upload", $cooks, array(), $lfile, $lname, "filepc");
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
preg_match('/Location:.+?\\r/i', $upfiles, $loca);
$redir = rtrim($loca[0]);
preg_match('/http:.+/i', $redir, $loca);
//$tmp='http://progress3.uploadbox.com/upload_status.cgi?uid='.$ids.'&nfiles=1&xmode=1&lang=en&files=:"'.$lname.'"&inline=1';
$Url = parse_url($loca[0]);
//$tmp1 = $tmp;
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 'http://uploadbox.com/?ac=upload', $cook, 0, 0, $_GET["proxy"], $pauth);
/*
$rnd="0.".rand(100000,999999).rand(100000,999999);
$tmp='http://progress3.uploadbox.com/upload_status.cgi?uid='.$ids.'&ajax2=1&num=0&lang=en&rnd='.$rnd;
$Url=parse_url($tmp);
$page = geturl($Url["host"], defport($Url), $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $tmp1, $cook, 0, 0, $_GET["proxy"],$pauth);
is_page($page);
is_notpresent ($page,'saved successfully','File not upload');
$tmp=cut_str($page,"<a href='","'");
if (!$tmp) html_error ('Error get url');
*/
$download_link = cut_str($page, "[URL=", "/]");
preg_match('/http:\\/\\/uploadbox.com\\/delete\\/\\w+/i', $page, $del);
$delete_link = $del[0];
}
// fixed by kaox 22/06/2009
示例11: str_replace
$Url["path"] = str_replace("download.php", "", $Url["path"]);
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, 0, $_GET["password"] ? array("downloadp" => $_GET["password"]) : 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$cookie = cut_str($page, 'Set-Cookie: ', ' ');
if ($location = trim(cut_str($page, "Location: ", "\n"))) {
if (strstr($location, "http://download")) {
$Href = $location;
$Url = parse_url($Href);
$FileName = !$FileName ? basename($Url["path"]) : $FileName;
insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . "&auth=" . $auth . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
die;
}
if (strstr($location, "error.php?")) {
html_error('Invalid or Deleted File');
}
$page = geturl($Url["host"], defport($Url), $location, $cookie, 0, 0, 0, $_GET["proxy"], $pauth);
if ($tmp = cut_str($page, 'Set-Cookie: ', ' ')) {
$cookie = $tmp;
}
$Referer = "http://www.mediafire.com{$location}";
} else {
$Referer = $LINK;
}
if (stristr($page, "Eo(); dh('')")) {
print "<form name=\"dl\" action=\"{$PHP_SELF}\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"link\" value=\"" . urlencode($LINK) . "\">\n<input type=\"hidden\" name=\"referer\" value=\"" . urlencode($Referer) . "\">";
print "<input type=\"hidden\" name=\"comment\" id=\"comment\" value=\"" . $_GET["comment"] . "\">\n<input type=\"hidden\" name=\"email\" id=\"email\" value=\"" . $_GET["email"] . "\">\n<input type=\"hidden\" name=\"partSize\" id=\"partSize\" value=\"" . $_GET["partSize"] . "\">\n<input type=\"hidden\" name=\"method\" id=\"method\" value=\"" . $_GET["method"] . "\">\n";
print "<input type=\"hidden\" name=\"proxy\" id=\"proxy\" value=\"" . $_GET["proxy"] . "\">\n<input type=\"hidden\" name=\"proxyuser\" id=\"proxyuser\" value=\"" . $_GET["proxyuser"] . "\">\n<input type=\"hidden\" name=\"proxypass\" id=\"proxypass\" value=\"" . $_GET["proxypass"] . "\">\n<input type=\"hidden\" name=\"path\" id=\"path\" value=\"" . $_GET["path"] . "\">\n";
print "<h4>Enter password here: <input type=\"text\" name=\"password\" size=\"13\"> <input type=\"submit\" onclick=\"return check()\" value=\"Download File\"></h4>\n";
print "<script language=\"JavaScript\">" . $nn . "function check() {" . $nn . "var imagecode=document.dl.imagestring.value;" . $nn . 'if (imagecode == "") { window.alert("You didn\'t enter the image verification code"); return false; }' . $nn . 'else { return true; }' . $nn . '}' . $nn . '</script>' . $nn;
print "</form>\n</body>\n</html>";
示例12: parse_url
$post['file_descr[0]'] = "";
$post['file_password[0]'] = "";
$post['flash_descr'] = "";
$post['flash_password'] = "";
$post['uploadurl[0]'] = "";
$post['url_descr[0]'] = "";
$post['url_password[0]'] = "";
$url = parse_url($upfrm);
?>
<script>document.getElementById('info').style.display='none';</script>
<?php
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 'http://www.upfordown.com/', $cookies, $post, $lfile, $lname, "uploadfile_0");
$locat = trim(cut_str($upfiles, 'Location:', "\n"));
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
$locat = trim(cut_str($upfiles, 'Location:', "\n"));
$Url = parse_url($locat);
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 'http://server1.uploadmachine.com/', $cookies, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$Url = parse_url('http://www.uploadmachine.com/members.php?showlinks=1');
$page = geturl($Url["host"], defport($Url), $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 'http://www.uploadmachine.com/', $cookies, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$temp = cut_str($page, 'this text">' . $lname, ' target=blank>http://www.uploadmachine.com/delete.php?');
$ddl = cut_str($page, 'http://www.uploadmachine.com/file/', '"');
$del = cut_str($page, 'http://www.uploadmachine.com/delete.php?id=', '"');
$download_link = 'http://www.uploadmachine.com/file/' . $ddl;
$delete_link = 'http://www.uploadmachine.com/delete.php?id=' . $del;
}
// Made by Baking 13/07/2009 15:22
示例13: fflush
fflush($fp);
while (!feof($fp)) {
$data = fgets($fp, 1024);
if ($data === false) {
break;
}
$page .= $data;
}
fclose($fp);
return $page;
}
?>
<script>document.getElementById('info').style.display='none';</script>
<div id='info' width='100%' align='center' style="font-weight:bold; font-size:14px">Upload File</div>
<?php
$upfiles = upfileput($url['host'], defport($url), $url['path'] . ($url['query'] ? '?' . $url['query'] : ''), 'http://filejungle.com/upload.php', $cookies, $post, $lfile, $lname, '');
$not_done = false;
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
preg_match('#shortenCode":"(.+)"}#', $upfiles, $ddl);
preg_match('#deleteCode":"(.+)","fileName"#', $upfiles, $del);
if (!empty($ddl[1])) {
$download_link = 'http://www.filejungle.com/f/' . $ddl[1] . '/' . $lname;
} else {
html_error('Didn\'t find downloadlink!');
}
if (!empty($del[1])) {
$delete_link = 'http://www.filejungle.com/f/' . $ddl[1] . '/delete/' . $del[1];
} else {
html_error('Didn\'t find deletelink!');
示例14: html_error
if ($dc <= 0) {
html_error('Error: Cannot get upload server.');
}
$up_url = $client->getUploadFormUrl($dc, $session);
if (!$up_url) {
html_error('Error: Cannot get upload url.');
}
$fid = $client->uploadStartFile($user, $pass, -1, $lname, $fsize);
if (!$fid) {
html_error('Error: Cannot get upload id.');
}
$post = array();
$post['resumableFileId'] = $fid;
$post['resumableFirstByte'] = 0;
// Uploading
echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
$url = parse_url($up_url);
$upfiles = upfile($url['host'], defport($url), $url['path'] . (!empty($url['query']) ? '?' . $url['query'] : ''), 0, 0, $post, $lfile, $lname, 'FilePart', '', $_GET['proxy'], $pauth);
// Upload Finished
echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
is_page($upfiles);
$finish = $client->uploadFinishFile($user, $pass, $fid, md5_file($lfile));
if (is_soap_fault($finish)) {
html_error('[' . $finish->faultcode . '] ' . htmlentities($finish->faultstring));
} elseif ($finish != '') {
html_error('Upload error: ' . htmlentities($finish));
}
$fileinfo = $client->getFileInfo($user, $pass, $fid);
$download_link = $fileinfo->downloadLink;
}
//[09-4-2013] Written by Th3-822
示例15: parse_url
<table width=600 align=center>
</td></tr>
<tr><td align=center>
<?php
$url = parse_url('http://www.imagehost.org/');
$post["a"] = "upload";
$upfiles = upfile($url["host"], defport($url), $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 'http://www.imagehost.org/', 0, $post, $lfile, $lname, "file[]");
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
$tmp = cut_str($upfiles, 'Download Link</td>', '</tr>');
$ddl = cut_str($tmp, 'size="50" value="', '"');
$download_link = $ddl;
// Made by Baking 05/09/2009 14:12