mirror of
https://codeberg.org/mayx/pages
synced 2026-02-15 21:14:50 +08:00
update
This commit is contained in:
520
2019/06/10/cheat.html
Normal file
520
2019/06/10/cheat.html
Normal file
@@ -0,0 +1,520 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Mayx被外国人骗了?! | Mayx的博客</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Mayx被外国人骗了?!" />
|
||||
<meta name="author" content="mayx" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta name="description" content="简直不可思议,我要把这个锅扔给百度翻译!" />
|
||||
<meta property="og:description" content="简直不可思议,我要把这个锅扔给百度翻译!" />
|
||||
<meta property="og:site_name" content="Mayx的博客" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:published_time" content="2019-06-10T00:00:00+08:00" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Mayx被外国人骗了?!" />
|
||||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2019-06-10T00:00:00+08:00","datePublished":"2019-06-10T00:00:00+08:00","description":"简直不可思议,我要把这个锅扔给百度翻译!","headline":"Mayx被外国人骗了?!","mainEntityOfPage":{"@type":"WebPage","@id":"/2019/06/10/cheat.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2019/06/10/cheat.html"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
<link rel="canonical" href="https://mabbs.github.io/2019/06/10/cheat.html" />
|
||||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||||
<!-- <![endif]-->
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||||
<link rel="me" href="https://github.com/Mabbs" />
|
||||
<script src="/assets/js/jquery.min.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
</script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-137710294-1');
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||||
<!-- <![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||||
<div class="wrapper">
|
||||
<header class="h-card">
|
||||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||||
|
||||
|
||||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||||
|
||||
|
||||
<p class="p-note">Mayx's Home Page</p>
|
||||
|
||||
<form action="/search.html">
|
||||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||||
|
||||
<ul class="downloads">
|
||||
|
||||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||||
|
||||
</ul>
|
||||
</header>
|
||||
<section class="h-entry">
|
||||
|
||||
<small><time class="date dt-published" datetime="2019-06-10T00:00:00+08:00">10 June 2019</time> - 字数统计:13385 - 阅读大约需要47分钟 - Hits: <span id="/2019/06/10/cheat.html" class="visitors">Loading...</span></small>
|
||||
<h1 class="p-name">Mayx被外国人骗了?!</h1>
|
||||
|
||||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||||
<div id="outdate" style="display:none;">
|
||||
<hr /><p>
|
||||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
daysold = Math.floor((new Date().getTime() - new Date("Mon, 10 Jun 2019 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||||
if (daysold > 90) {
|
||||
document.getElementById("outdate").style.display = "block";
|
||||
document.getElementById("outime").innerHTML = daysold;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
|
||||
<b>AI摘要</b>
|
||||
<p id="ai-output">这篇文章讲述了网友Mayx收到一个外国女性Lori Robinson的邮件,声称自己因军务原因需找一个非美国公民的合作伙伴接收价值巨大的资金、黄金和钻石。Lori表示这些财富是她在伊拉克提供石油合同保护赚得,还提到有一项关于矿产的慈善计划。她请求Mayx提供个人信息以进行快递。Mayx对这突如其来的提议感到惊讶,提出了关于年龄和异地关系的问题,但Lori坚称年龄和爱才是关键。在获取了Mayx的地址后,Lori要求Mayx立即联系贸易公司。整个事件中充满了疑点,Mayx似乎被骗了,但也可能只是在讲述一个奇异的经历。</p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
<ul><li><a href="#事件发展">事件发展</a></li><li><a href="#结果">结果</a></li></ul>
|
||||
<hr />
|
||||
|
||||
|
||||
<main class="post-content e-content" role="main"><p>简直不可思议,我要把这个锅扔给百度翻译!<!--more--><del>(百度翻译表示不接这个锅23333)</del></p>
|
||||
<h1 id="事件发展">
|
||||
|
||||
|
||||
<a href="#事件发展"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 事件发展
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>这个事件发生在高考前,现在高考结束了来总结一下 </p><p>
|
||||
有一天,有一个叫做<a href="mailto:lori.j.robinson@usa.com">Lori Robinson</a>的外国人给我发了一封邮件,内容如下:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Hello dear,</p>
|
||||
|
||||
<p>Thanks so much for coming into my life the time I needed you most. I have decided to spend the rest of my energy in building a home with you, firstly, we have to accept our faith that this journey of love will not be so easy or rosy, but be assured that nothing good comes very easy and we need to be strong and be ready to stand for each other. I have decided to moving my assets to your country so I can forward for my retirement but I want to take an official leave so I can visit you in your country ,I have made some good fortune in this war zone, You know I offer contract security network for the crude oil lifting in Iraq and also I fund local miners to mine and extract gold and diamonds, at least 150 people are working in my mining concession legally given to me by the Afghan government, in return I have an NGO housing, clothing, feeding and education 100 motherless kids.</p>
|
||||
|
||||
<p>I am interested to moving my generated funds, gold and diamonds and The funds is $3.5,000,000 ( Three Million, five hundred thousand US Dollars) the Gold is 1730kgs of gold and the diamonds is 25,000carats parcel of uncut diamonds,I am a woman who does things according to the guidelines of my spirit, you was chosen to be my partner and also to help me to get this box, because my mind testify that you are the right person for me and I know you will not disappoint me , I chose to use you as a partner in this deal, because I’m not allowed to send the package to all of my friends or relatives as i am still in the military outside the United States, though at the end if i send anything to the USA it will be suspicious and I be will query for the action, so I chose you because I know you are the ideal person for this deal as a foreigner who is not a US citizen.</p>
|
||||
|
||||
<p>Please put away the fear or doubt, and make up your mind to help me in this matter, I promise you will not regret it been part of this matter, I do not know what else I can say to convince you and make you believe me, but I I pray that God will give you the grace to make up your mind,Once again I want you to know that there is no complication in the way, if you follow my instructions everything will go smoothly and well in the process of receiving the case, please try to keep this secret matter between you and me, to avoid making space to the enemy, because if you and I should agree on one thing with our heart with seriousness we must surely achieve success in the end.</p>
|
||||
|
||||
<p>Please I want to mention once again that any disposition toward this project is intact between each of us and in no circumstances should you let the security company to know the contents of the box, remember that the box was registered as a diplomat for the package security company and that is what they believe to be in the box, so you should not let them know that the content of the box is money.</p>
|
||||
|
||||
<p>Please I will like you to send your information to me so that I can pass on to security cargo company to allow them to proceed to your country for the final delivery of cash at your door step. Send your information to me urgently;</p>
|
||||
|
||||
<p>Your full names: ……….. </p><p>
|
||||
Your age: ……….. </p><p>
|
||||
Your Address: ………….. </p><p>
|
||||
ZIP CODE: …………….. </p><p>
|
||||
City: …………………. </p><p>
|
||||
Country: ………………. </p><p>
|
||||
Phone number: ……… </p><p>
|
||||
Profession: …………….</p>
|
||||
|
||||
<p>Once i am done with my official assignment, I will come to meet you one on one in your country, and after that we will have to decide how to carry on with our lives, but for now, please, I appreciate us to pay more attention to this issue, you receive the delivery and keep it safe until I come over to discuss with you on how best to invest it in your country</p>
|
||||
|
||||
<p>I await your immediate response </p><p>
|
||||
Kiss </p><p>
|
||||
Loris Robinson</p>
|
||||
</blockquote>
|
||||
|
||||
<p>emmmm写的不错,不过看不太懂……算啦,丢到百度翻译上看看吧,结果大意就是她有好多好多钱、钻石、金块和矿,然后想给我,让我把我的地址发给她,好让她邮过来。 </p><p>
|
||||
不过这不是最重要的,重要的是她想和我结婚?!要知道我才高中刚毕业,于是我向她提出了这个疑问,得到的回答是:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Remember that distance or color does not matter even our age but love matters a lot in life , I am a woman who does things according to the guidelines of my spirit, you was chosen to be my partner and also to help me to get this fund, because my mind testify that you are the right person for me and I know you will not disappoint me , I chose to use you as a partner in this deal, because I’m not allowed to send the package to all of my friends or relatives as i am still in the military outside the United States.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>哦,说的很有道理的样子,年龄无所谓,那是不是Lolicon也可以满足了?反正我的信息也值不了多少钱,那就给吧,于是我给她发了我的收件地址。然后她给我回信:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>PLEASE CONTACT THE TRADING COMPANY NOW</p>
|
||||
|
||||
<p>I have contacted the courier company (Express Delivery Parcel Service ) that they are reliable and reliable.Once again I want you to know that there is no complication in the way, if you follow my instructions everything will go smoothly and well in the process of receiving the case, please try to keep this secret matter between you and me, to avoid making space to the enemy, because if you and I should agree on one thing with our heart with seriousness we must surely achieve success in the end.</p>
|
||||
|
||||
<p>This delivery is going to be handle legally by the Express Delivery Parcel Service and there will be no form of risk in the process and the money will be sealed pack safely in a Diplomatic Box and the Diplomatic Box will be deliver to you in your country by a Diplomat. I have decide to compensate you with 30% of the total money once after the $3.5,000,000 ( Three Million, five hundred thousand US Dollars), the Gold is 1730kgs of gold and the diamonds is 25,000carats parcel of uncut diamonds.is delivered to you, while the rest balance shall be my investment capital in your country.</p>
|
||||
|
||||
<p>Please I want to mention once again that any disposition toward this project is intact between each of us and in no circumstances should you let the security company to know the contents of the box, remember that the box was registered as a diplomat for the package security company and that is what they believe to be in the box, so you should not let them know that the content of the box is money.</p>
|
||||
|
||||
<p>I have chosen this fast service so that you can receive the package within 72 hours after departure, bring the package to your home address, the bank have registered it to Express Delivery Parcel Service shipping and handed it to the company through their agent here, The company is with all your details,
|
||||
Here at our military base, the government provides everything we need, our paycheck is paid to our bank account in the United States until we return home after the mission as long as I stay in Afghanistan, I can not receive or send The money you paid , I have paid for the registration of the shipment and I placed a shipment order to the shipping company for delivery of the box at your door step in your country. Please note that the diplomat does not know the contents of the box for security reasons and below is the company’s contact details,
|
||||
Please contact them now, tell them your name and country, that you are the right person to receive the cargo from Lory Robinson, a US Army officer.</p>
|
||||
|
||||
<p>Fill in this information and send it to the security company and inform me:</p>
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>-------------------------------------------------
|
||||
My name is ............. Permanent resident ........................ I'm communicating with Lori's report Robinson, Email:
|
||||
lori.j.robinson@usa.com The company registers the shipment to the following address:
|
||||
Full names:
|
||||
Age:
|
||||
Address:
|
||||
Occupation:
|
||||
POSTCODES:
|
||||
City:
|
||||
Country:
|
||||
Phone number:
|
||||
Profession:
|
||||
--------------------------------------------------
|
||||
The delivery company's information is below:
|
||||
GLOBAL FASTWAY COURIER SERVICES / SAFETY COMPANY.
|
||||
E-MAIL: express.global@uymail.com
|
||||
E-MAIL: express.global@linuxmail.org
|
||||
Av. Del General Perón, 32
|
||||
28008 Madrid,
|
||||
Spain
|
||||
Tel. +34 612 520330
|
||||
DIRECTOR OF PARTICIPATION
|
||||
Mr. William Anderson
|
||||
----------------------------------------------- --- -------
|
||||
</code></pre></div> </div>
|
||||
<p>Just write to the company in the above email immediately, the company will be provided as soon as you contact them, I have begun with the agreement to meet you in your country before it expires month. </p><p>
|
||||
Allow me to stop so far and expect to receive your positive feedback once you contact the company. God bless you and your family.</p>
|
||||
|
||||
<p>Love you and Kisses. </p><p>
|
||||
Love and care from, </p><p>
|
||||
Lori Robinson</p>
|
||||
</blockquote>
|
||||
|
||||
<p>大意就是让我把我的信息再转发给邮递公司吧,反正信息已经发过一次了,那再发一次也无所谓了吧,于是我给这个所谓的邮递公司发了我的信息,那个公司给我回复:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>EUROPE HEAD OFFICE, </p><p>
|
||||
GLOBAL BRAND EXPRESS COURIER SERVICES, </p><p>
|
||||
INTERNATIONAL AND LOCAL SHIPPING SERVICES, </p><p>
|
||||
Av. del General Perón, 32 </p><p>
|
||||
28008 Madrid, </p><p>
|
||||
Spain, </p><p>
|
||||
Tel +34 612 520330, </p><p>
|
||||
E-mail:express.global@uymail.com</p>
|
||||
|
||||
<p>HE SHIPMENT / DELIVERY SITUATION REPORT OF YOUR CONSIGNMENT IN SPAIN:</p>
|
||||
|
||||
<p>ATTENTION: </p><p>
|
||||
ADDRESS : ….. </p><p>
|
||||
CITY : ………….. </p><p>
|
||||
COUNTRY ………….China </p><p>
|
||||
TELL …………….+86</p>
|
||||
|
||||
<p>HE SHIPMENT / DELIVERY SITUATION REPORT OF YOUR CONSIGNMENT IN SPAIN:</p>
|
||||
|
||||
<p>The above subject matter refers,</p>
|
||||
|
||||
<p>The management of Global Fast Way Courier Service want to notify you that your consignment/one cargo box has been registered with our shipment company with Registration ID: AFGH55870199SJH for delivery to your country as soon as the necessary shipment logistics and requirement are obtained.</p>
|
||||
|
||||
<p>we have earlier been informed about you by Your partner Loris Robinson , that she appointed you as the beneficiary to receive her shipment labelled (FAMILY TREASURE) a CONSIGNMENT/ONE CARGO BOX to your destination.</p>
|
||||
|
||||
<p>OUR SERVICE TYPE DELIVERY DURATION CHARGES/FEES:</p>
|
||||
|
||||
<p>Handling & Delivery Cost……570 Euro </p><p>
|
||||
Insurance……………………..690 Euro </p><p>
|
||||
Total Cost……………………1,260 Euro </p><p>
|
||||
Length of Days………………………Two Days </p><p>
|
||||
Order Number…………………………..UESTNL</p>
|
||||
|
||||
<p>Finally you are required to send the shipment and Insurance fee of 1,260 Eur to enable a proper facilitation and delivery of your consignment to your address in your country and note that the charges are best substantial because of the insurance cover we have undertaken in case of loss, damage or package breakage of your high priority consignment. We assume all responsibilities in case of any eventualities.</p>
|
||||
|
||||
<p>YOU CAN MAKE THE PAYMENT TO US THROUGH MONEYGRAM WITH OUR ACCOUNT AUDITOR’S INFORMATION,BUT THAT WILL BE WHEN YOU SEND US YOUR SCANNED COPY OF YOUR INTERNATIONAL PASSPORT OR DRIVER’S LICENSE,BEFORE WE CAN SEND YOU OUR ACCOUNT AUDITOR’S INFORMATION YOU WILL USE TO SEND THE 1,260 Euro. </p><p>
|
||||
Thanks for your Co-operation. </p><p>
|
||||
WE PROMISE TO GRANT THE BEST OF OUR SERVICES TO ALL OUR CUSTOMERS & YOUR SATISFACTION IS OUR REPUTATION.</p>
|
||||
|
||||
<p>Yours Faithfully, </p><p>
|
||||
Global Fast Way Courier Services </p><p>
|
||||
DIRECTOR IN CHARGE </p><p>
|
||||
Mr William Anderson </p><p>
|
||||
Tel +34 612 520330</p>
|
||||
</blockquote>
|
||||
|
||||
<p>然后还非常用心的配了一张快递单:</p>
|
||||
|
||||
<p><img src="/images/GEDSC%20AIRWAY%20BILL%20TO%20CHINA.jpg" alt="GEDSC AIRWAY BILL TO CHINA" /></p>
|
||||
|
||||
<p>注:由于隐私原因,涉及隐私的地方已经被删除 <del>(尽管大家都知道我的手机号)</del> </p><p>
|
||||
这个邮件当时也没细看,然后就给Lori Robinson说了我已经给他们发了我的信息,过了几天,她给我发:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Hello my love how are you doing ? Am so sorry you did not hear from me i was on duty i have not hear from you today i hope all is well with you? I plead with you in the name of God to try your best to negotiate with the security delivery company I’m worried because I can’t live without you right here. You’re my everything and Last night I did not sleep am worry about you my love.</p>
|
||||
|
||||
<p>The delivery of the box to you holds a lot for us in the future. Once you receive the box, I will commence on the process of tendering resignation and once it is granted, I will come to your country for the sharing of the fund and planning a better future and life together. I cannot wait to be on your arms.</p>
|
||||
|
||||
<p>Kiss </p><p>
|
||||
Lori J Robinson</p>
|
||||
</blockquote>
|
||||
|
||||
<p>嗯,不错,她又强调了一遍这个邮件,顺带着表现了一下关心,不过我当时在学校,然后我就和她说我在学校,不方便收Email。 </p><p>
|
||||
当我回到家里,那个破公司给我发了一份邮件:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>EUROPE HEAD OFFICE, </p><p>
|
||||
GLOBAL BRAND EXPRESS COURIER SERVICES, </p><p>
|
||||
INTERNATIONAL AND LOCAL SHIPPING SERVICES, </p><p>
|
||||
Av. del General Perón, 32 </p><p>
|
||||
28008 Madrid, </p><p>
|
||||
Spain, </p><p>
|
||||
Tel +34 612 520330, </p><p>
|
||||
E-mail:express.global@uymail.com</p>
|
||||
|
||||
<p>ATTENTION: ,</p>
|
||||
|
||||
<p>YOU HAVE HAVE TO SEND US YOUR SCANNED COPY OF YOUR INTERNATIONAL PASSPORT OR DRIVER’S LICENSE AND YOU CAN USE THIS INFORMATION AND SEND THIS MOREY TO OUR OFFICE 1,260 EURO AS SOON AS YOU MAKE THE PAYMENT SEND US THE PAYMENT DETAILS TO NABLE US PROCESS AND COMMECE YOUR SHIPMENT TO ARRIVE AT YOUR DOOR STEI IN YOUR COUNTRY WITHIN THE NEXT 3 WORKING DAYS. THE DATE AND CONFIRMED OF ARRIVAL WILL BE ISSUED TO YOU. YOU CAN MAKE THE PAYMENT TO US WITH OUR ACCOUNT AUDITOR’S INFORMATION AN STATED BELOW:</p>
|
||||
|
||||
<p>BANK : BBVA. </p><p>
|
||||
ACC/IBAN: ES3501822659150201596186. </p><p>
|
||||
Swift : BBVAESMMXXX. </p><p>
|
||||
ACC NAME : ARCHER SAMUEL. </p><p>
|
||||
Address: Bulevard Ciudad de VICAR 1245. </p><p>
|
||||
Spain.</p>
|
||||
|
||||
<p>Thanks for your Co-operation. </p><p>
|
||||
WE PROMISE TO GRANT THE BEST OF OUR SERVICES TO ALL OUR CUSTOMERS & YOUR SATISFACTION IS OUR REPUTATION.</p>
|
||||
|
||||
<p>Yours Faithfully, </p><p>
|
||||
Global Fast Way Courier Services </p><p>
|
||||
DIRECTOR IN CHARGE </p><p>
|
||||
Mr William Anderson </p><p>
|
||||
Tel +34 612 520330</p>
|
||||
</blockquote>
|
||||
|
||||
<p>啊,要交钱的么……<del>于是Mayx就立马付款,上当受骗了</del>(才怪,我哪有那么多钱?)到这里一看就知道是骗子了,其实之前那个快递单仔细一看就是假的,那个条形码画的乱七八糟…… </p><p>
|
||||
不过我还想聊下去,于是我给Lori Robinson说我付不起啊!于是她给我回复:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Hello sweetheart,</p>
|
||||
|
||||
<p>Hello how are you doing and your school i hope you are doing good in school? I am very sorry my darling for late response to you, I had a hectic day and was very sick that was why I couldn’t get back to you, but I am fine and healthy again , Actually you are really trying for the success of this delivering box to you, in fact i thank you for all the efforts you have put on this already.But one thing you must know and understand is this, the express global company does not know that the content of the box is money and on no account should you tell them that what is inside the box is money, i received massage from delivery company the asking you to pay the fee of 1260 .</p>
|
||||
|
||||
<p>I beg you to do anything within your means to comply with the security company so that you will receive this box, I have no access to money here and i do not know what else to do in this matter, the successful delivery of this box to you will determine how soon we will meet. </p><p>
|
||||
The U.S government provides everything that we need in the military base here, our salary are being paid into our Account via Bank of American Military banking in the United States, so i only have access to my account in U.S, but that will be after our assignment here in Syria, that’s why i cannot make any payment and i decided to ask for your help. I cannot access my bank account in America while in the battle field, I can only access my account when I am back to the states for security reasons, please understand me and do something OK.</p>
|
||||
|
||||
<p>My dear, i know you might not be happy with the response of the security delivery company asking you for some payment. so please i am counting and depending on you for the success of the fund. I believe in your ability to handle the project amicably with no delay so please i need your cooperation here to complete the security delivery company as soon as possible. I hope to hear from you as soon as you make the payment to them.</p>
|
||||
|
||||
<p>And remember this is our future and our love that we are talking about OK,
|
||||
Please kindly look for means even if it means to borrow or sale something, do it to sort out the bill so that the security delivery company will deliver the box to you, once I come back I really want to see you so that we will build life together.</p>
|
||||
|
||||
<p>Please you really have to try your best, you are the only hope i have now. and remember do not take this matter lighly.</p>
|
||||
|
||||
<p>Once the delive the funds, to you I will come to meet you one on one in your country, and after that we will have to decide how to carry on with our lives, but for now, please, I appreciate us to pay more attention to this issue, you receive the delivery and keep it safe until I come over to discuss with you on how best to invest it in your country</p>
|
||||
|
||||
<p>I await your immediate response </p><p>
|
||||
Kiss </p><p>
|
||||
Loris Robinson</p>
|
||||
</blockquote>
|
||||
|
||||
<p>看这个意思是让我砸锅卖铁也要付这个钱?我可不干,然后她回复:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Dearest,</p>
|
||||
|
||||
<p>Hello thanks you for your message you send to me,I plead with you in the name of God to try your best to negotiate with the security delivery company and pay the fee, At this very point we have no other option than to comply with the delivery company because if they open the box, it will be a very big problem for us. Sweetheart, please lets you do the needful at this very stage before the military seal on the box expires.</p>
|
||||
|
||||
<p>I want you to kindly write to the security company and tell them the amount of money you have with you and plead with them that you will send the balance to them as soon as you receive the box. Tell them the amount you can pay presently no matter how little let us see their response.</p>
|
||||
|
||||
<p>I await your immediate response </p><p>
|
||||
Kiss </p><p>
|
||||
Loris Robinson</p>
|
||||
</blockquote>
|
||||
|
||||
<p>……emmmm懒得理她了,于是这个事件到此为止。</p>
|
||||
<h1 id="结果">
|
||||
|
||||
|
||||
<a href="#结果"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 结果
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>Mayx没有任何损失,怎么能叫骗呢?可是她给我带来了希望,又给我绝望,是想当QB吗?(LOL)</p></main>
|
||||
|
||||
|
||||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=Mayx"><em>Mayx</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E5%A4%96%E5%9B%BD%E4%BA%BA"><em>外国人</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E9%AA%97%E5%AD%90"><em>骗子</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2019-06-10-cheat.md">查看原始文件</a></span></small>
|
||||
|
||||
|
||||
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
|
||||
<p id="suggest-container">Loading...</p>
|
||||
<script>
|
||||
var suggest = $("#suggest-container");
|
||||
$.get(BlogAPI + "/suggest?id=/2019/06/10/cheat.html&update=" + lastUpdated.valueOf(), function (data) {
|
||||
if (data.length) {
|
||||
getSearchJSON(function (search) {
|
||||
suggest.empty();
|
||||
var searchMap = {};
|
||||
for (var i = 0; i < search.length; i++) {
|
||||
searchMap[search[i].url] = search[i];
|
||||
}
|
||||
|
||||
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
|
||||
for (var j = 0; j < data.length; j++) {
|
||||
var item = searchMap[data[j].id];
|
||||
if (item) {
|
||||
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
|
||||
var contentPreview = item.content.substring(0, 100);
|
||||
if (item.content.length > 100) {
|
||||
contentPreview += "……";
|
||||
}
|
||||
link.hover(
|
||||
function(e) {
|
||||
tooltip.text($(this).data('content'))
|
||||
.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
})
|
||||
.show();
|
||||
},
|
||||
function() {
|
||||
tooltip.hide();
|
||||
}
|
||||
).mousemove(function(e) {
|
||||
tooltip.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
});
|
||||
}).data('content', contentPreview);
|
||||
|
||||
suggest.append(link);
|
||||
suggest.append(' - ' + item.date + '<br />');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
suggest.html("暂无推荐文章……");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<div class="pagination">
|
||||
|
||||
<span class="prev">
|
||||
<a href="/2019/05/30/exam.html">
|
||||
上一篇:高考即将来临
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
|
||||
<span class="next">
|
||||
<a href="/2019/06/11/encrypt.html">
|
||||
下一篇:Jekyll也可以加密文章啦!
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||||
<script src="/assets/js/gitalk.min.js"></script>
|
||||
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
repo: 'mabbs.github.io',
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '/2019/06/10/cheat', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<!-- <![endif]-->
|
||||
|
||||
</section>
|
||||
<!--[if !IE]> -->
|
||||
<div id="landlord" style="left:5px;bottom:0px;">
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<form id="live_talk_input_form">
|
||||
<div class="live_talk_input_name_body" >
|
||||
<input type="checkbox" id="load_this" />
|
||||
<input type="hidden" id="post_id" value="/2019/06/10/cheat.html" />
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||||
<div class="live_ico_box" style="display:none;">
|
||||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||||
<input id="duType" value="douqilai" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||||
<!-- <![endif]-->
|
||||
<footer>
|
||||
<p>
|
||||
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数:617672 - 文章数:179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/js/scale.fix.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
<script src="/assets/js/main_new.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
267
2019/06/11/encrypt.html
Normal file
267
2019/06/11/encrypt.html
Normal file
@@ -0,0 +1,267 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Jekyll也可以加密文章啦! | Mayx的博客</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Jekyll也可以加密文章啦!" />
|
||||
<meta name="author" content="mayx" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta name="description" content="Jekyll赛高!" />
|
||||
<meta property="og:description" content="Jekyll赛高!" />
|
||||
<meta property="og:site_name" content="Mayx的博客" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:published_time" content="2019-06-11T00:00:00+08:00" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Jekyll也可以加密文章啦!" />
|
||||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2019-06-11T00:00:00+08:00","datePublished":"2019-06-11T00:00:00+08:00","description":"Jekyll赛高!","headline":"Jekyll也可以加密文章啦!","mainEntityOfPage":{"@type":"WebPage","@id":"/2019/06/11/encrypt.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2019/06/11/encrypt.html"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
<link rel="canonical" href="https://mabbs.github.io/2019/06/11/encrypt.html" />
|
||||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||||
<!-- <![endif]-->
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||||
<link rel="me" href="https://github.com/Mabbs" />
|
||||
<script src="/assets/js/jquery.min.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
</script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-137710294-1');
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||||
<!-- <![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||||
<div class="wrapper">
|
||||
<header class="h-card">
|
||||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||||
|
||||
|
||||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||||
|
||||
|
||||
<p class="p-note">Mayx's Home Page</p>
|
||||
|
||||
<form action="/search.html">
|
||||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||||
|
||||
<ul class="downloads">
|
||||
|
||||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||||
|
||||
</ul>
|
||||
</header>
|
||||
<section class="h-entry">
|
||||
|
||||
<small><time class="date dt-published" datetime="2019-06-11T00:00:00+08:00">11 June 2019</time> - 字数统计:God Knows - Hits: <span id="/2019/06/11/encrypt.html" class="visitors">Loading...</span></small>
|
||||
<h1 class="p-name">Jekyll也可以加密文章啦!</h1>
|
||||
|
||||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||||
<div id="outdate" style="display:none;">
|
||||
<hr /><p>
|
||||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
daysold = Math.floor((new Date().getTime() - new Date("Tue, 11 Jun 2019 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||||
if (daysold > 90) {
|
||||
document.getElementById("outdate").style.display = "block";
|
||||
document.getElementById("outime").innerHTML = daysold;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/assets/js/aes.js"></script>
|
||||
<script>
|
||||
function getByteLen(val) {
|
||||
var len = 0;
|
||||
for (var i = 0; i < val.length; i++) {
|
||||
if (val[i].match(/[^\x00-\xff]/ig) != null) len += 3;
|
||||
else len += 1;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
function onbtnDecrypto() {
|
||||
var encryptedData = "bbb68859d4e2a8a508932f48a440c894858154b96b3d5113a4488dd2425a709caf3795dcbd4aac25d9ab0f1628b85944cd69b28aae96bdb59a0c792cd9d93bf833e126f474642909164907daef803ecac7753ea5e85000521f80b85fa787e49d8b51faaef35ee728e007253b1a97880987127df248818f295da374a7c7d30950e3ad696f5ccb8c59fe274d4c3a5a3da65c35802d5c00d11be0936498ff4130fb61853bf9f0e8f28d446d612478edf050ebf826a293cd6941dacf40aea5482b74555c1daf052903e7cf6e5d5084842a47e80f31a11d3d542d3cdb4fa9dc20c9ce27f9b2c04fd31a79e1affd503316852073336dd8f446690c08335a93f8e19777ae4441d2d1dd37acd8039fae938f7eaf1a3173c5bd21e1b507d9522b517cd3dc0709bbbad11e0a7ca1f7bc7b8c40ecc20d765227b34d46d9c00c3ce928c1c561f4147f7e4ab975c9a8dc6bb1e10dea990b9a88abecf32046c5d52ea9f8025ce657d91ef35670c516df3d8e1c4f34fa6c4c90a3bb067981d380b3af65bf3273be699ff3831c62ce85de36f03b51f5e767";
|
||||
var keyword = document.getElementById("inputkey").value;
|
||||
|
||||
if (keyword.replace(/(^\s*)|(\s*$)/g, "") == '') {
|
||||
alert("请输入密码!");
|
||||
return;
|
||||
}
|
||||
while (getByteLen(keyword) % 8 != 0) {
|
||||
keyword = keyword + "\0";
|
||||
}
|
||||
|
||||
var key = CryptoJS.enc.Utf8.parse(keyword);
|
||||
var encryptedHexStr = CryptoJS.enc.Hex.parse(encryptedData);
|
||||
var encryptedBase64Str = CryptoJS.enc.Base64.stringify(encryptedHexStr);
|
||||
|
||||
var decryptedData = CryptoJS.AES.decrypt(encryptedBase64Str, key, {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
|
||||
if (decryptedData.sigBytes < 0) {
|
||||
document.getElementById("output").innerHTML = "解密失败!密文或者key错误!";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
decryptedData.toString(CryptoJS.enc.Utf8)
|
||||
} catch(e) {
|
||||
document.getElementById("output").innerHTML = "解密失败!密文或者key错误!";
|
||||
return;
|
||||
}
|
||||
var decryptedStr = decryptedData.toString(CryptoJS.enc.Utf8);
|
||||
document.getElementById("output").innerHTML = decryptedStr;
|
||||
document.getElementById("pwinput").style.display = "none";
|
||||
}
|
||||
</script>
|
||||
<div id="pwinput">请输入Mayx<br />
|
||||
<input id="inputkey" type="password" /> <button onclick="onbtnDecrypto()">解密</button>
|
||||
</div>
|
||||
<div id="output"></div> <br />
|
||||
|
||||
|
||||
|
||||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=Jekyll"><em>Jekyll</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E5%8A%A0%E5%AF%86"><em>加密</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2019-06-11-encrypt.md">查看原始文件</a></span></small>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="pagination">
|
||||
|
||||
<span class="prev">
|
||||
<a href="/2019/06/10/cheat.html">
|
||||
上一篇:Mayx被外国人骗了?!
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
|
||||
<span class="next">
|
||||
<a href="/2019/06/22/counter.html">
|
||||
下一篇:如何自己写一个博客计数器
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||||
<script src="/assets/js/gitalk.min.js"></script>
|
||||
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
repo: 'mabbs.github.io',
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '/2019/06/11/encrypt', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<!-- <![endif]-->
|
||||
|
||||
</section>
|
||||
<!--[if !IE]> -->
|
||||
<div id="landlord" style="left:5px;bottom:0px;">
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<form id="live_talk_input_form">
|
||||
<div class="live_talk_input_name_body" style="display:none;">
|
||||
<input type="checkbox" id="load_this" />
|
||||
<input type="hidden" id="post_id" value="/2019/06/11/encrypt.html" />
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||||
<div class="live_ico_box" style="display:none;">
|
||||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||||
<input id="duType" value="douqilai" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||||
<!-- <![endif]-->
|
||||
<footer>
|
||||
<p>
|
||||
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数:617672 - 文章数:179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/js/scale.fix.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
<script src="/assets/js/main_new.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
387
2019/06/22/counter.html
Normal file
387
2019/06/22/counter.html
Normal file
@@ -0,0 +1,387 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>如何自己写一个博客计数器 | Mayx的博客</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="如何自己写一个博客计数器" />
|
||||
<meta name="author" content="mayx" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta name="description" content="都怪LeanCloud,我得自己写计数器了!" />
|
||||
<meta property="og:description" content="都怪LeanCloud,我得自己写计数器了!" />
|
||||
<meta property="og:site_name" content="Mayx的博客" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:published_time" content="2019-06-22T00:00:00+08:00" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="如何自己写一个博客计数器" />
|
||||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2019-06-22T00:00:00+08:00","datePublished":"2019-06-22T00:00:00+08:00","description":"都怪LeanCloud,我得自己写计数器了!","headline":"如何自己写一个博客计数器","mainEntityOfPage":{"@type":"WebPage","@id":"/2019/06/22/counter.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2019/06/22/counter.html"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
<link rel="canonical" href="https://mabbs.github.io/2019/06/22/counter.html" />
|
||||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||||
<!-- <![endif]-->
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||||
<link rel="me" href="https://github.com/Mabbs" />
|
||||
<script src="/assets/js/jquery.min.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
</script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-137710294-1');
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||||
<!-- <![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||||
<div class="wrapper">
|
||||
<header class="h-card">
|
||||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||||
|
||||
|
||||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||||
|
||||
|
||||
<p class="p-note">Mayx's Home Page</p>
|
||||
|
||||
<form action="/search.html">
|
||||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||||
|
||||
<ul class="downloads">
|
||||
|
||||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||||
|
||||
</ul>
|
||||
</header>
|
||||
<section class="h-entry">
|
||||
|
||||
<small><time class="date dt-published" datetime="2019-06-22T00:00:00+08:00">22 June 2019</time> - 字数统计:1913 - 阅读大约需要7分钟 - Hits: <span id="/2019/06/22/counter.html" class="visitors">Loading...</span></small>
|
||||
<h1 class="p-name">如何自己写一个博客计数器</h1>
|
||||
|
||||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||||
<div id="outdate" style="display:none;">
|
||||
<hr /><p>
|
||||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
daysold = Math.floor((new Date().getTime() - new Date("Sat, 22 Jun 2019 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||||
if (daysold > 90) {
|
||||
document.getElementById("outdate").style.display = "block";
|
||||
document.getElementById("outime").innerHTML = daysold;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
|
||||
<b>AI摘要</b>
|
||||
<p id="ai-output">这篇文章讲述了作者因为LeanCloud服务不再可用,决定自己动手写一个博客计数器。作者详细描述了计数器的前端显示、JS代码实现(利用Jquery调用后端接口更新点击数)、后端部分(包括MySQL数据库设计和PHP代码,用于增加和查询计数)。文章还记录了作者学习和改进过程,以及对自建计数器的信心,特别是对垃圾云服务的替代方案。</p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
<ul><li><a href="#事件起因">事件起因</a></li><li><a href="#使用方法">使用方法</a><ul><li><a href="#前端部分">前端部分</a></li><li><a href="#后端部分">后端部分</a></li></ul></li><li><a href="#结果">结果</a></li></ul>
|
||||
<hr />
|
||||
|
||||
|
||||
<main class="post-content e-content" role="main"><p>都怪LeanCloud,我得自己写计数器了!<!--more--></p>
|
||||
<h1 id="事件起因">
|
||||
|
||||
|
||||
<a href="#事件起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 事件起因
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>我之前用的博客计数器是用的LeanCloud作为后台制作的计数器,然后嘛……代码是抄的。结果最近<a href="https://blog.avoscloud.com/6841/">LeanCloud凉了</a>,这让我无法忍受,之前的代码我也看不懂,改也不会改…… </p><p>
|
||||
那好吧,我只好自己写计数器了。 </p><p>
|
||||
于是我花了很长时间,自己写了一个计数器,另外还得把原来的计数器信息转移过来……</p>
|
||||
<h1 id="使用方法">
|
||||
|
||||
|
||||
<a href="#使用方法"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 使用方法
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<h2 id="前端部分">
|
||||
|
||||
|
||||
<a href="#前端部分"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 前端部分
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<p>主页显示点击数:</p>
|
||||
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Hits: <span class="nt"><span</span> <span class="na">id=</span><span class="s">"{{ post.url }}"</span> <span class="na">class=</span><span class="s">"visitors-index"</span> <span class="nt">></span>Loading...<span class="nt"></span></span>
|
||||
</code></pre></div></div>
|
||||
<p>内页显示点击数:</p>
|
||||
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code> Hits: <span class="nt"><span</span> <span class="na">id=</span><span class="s">"{{ page.url }}"</span> <span class="na">class=</span><span class="s">"visitors"</span> <span class="nt">></span>Loading...<span class="nt"></span></span>
|
||||
</code></pre></div></div>
|
||||
<p>JS代码:(需要Jquery)</p>
|
||||
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">auxiliaryHost</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">你的域名</span><span class="dl">"</span><span class="p">;</span>
|
||||
<span class="kd">function</span> <span class="nx">showHitS</span><span class="p">(</span><span class="nx">hits</span><span class="p">){</span>
|
||||
<span class="nx">$</span><span class="p">.</span><span class="kd">get</span><span class="p">(</span><span class="nx">auxiliaryHost</span><span class="o">+</span><span class="dl">"</span><span class="s2">/counter.php?action=show&id=</span><span class="dl">"</span><span class="o">+</span><span class="nx">hits</span><span class="p">.</span><span class="nx">id</span><span class="p">,</span><span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">){</span>
|
||||
<span class="nx">hits</span><span class="p">.</span><span class="nx">innerHTML</span><span class="o">=</span><span class="nb">Number</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
|
||||
<span class="p">});</span>
|
||||
<span class="p">}</span>
|
||||
<span class="kd">function</span> <span class="nx">showHitCount</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="kd">var</span> <span class="nx">visitors</span><span class="o">=</span><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">.visitors-index</span><span class="dl">"</span><span class="p">);</span>
|
||||
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span> <span class="o"><</span> <span class="nx">visitors</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">){</span>
|
||||
<span class="nx">showHitS</span><span class="p">(</span><span class="nx">visitors</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
<span class="kd">function</span> <span class="nx">addCount</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="kd">var</span> <span class="nx">visitors</span><span class="o">=</span><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">.visitors</span><span class="dl">"</span><span class="p">);</span>
|
||||
<span class="nx">$</span><span class="p">.</span><span class="kd">get</span><span class="p">(</span><span class="nx">auxiliaryHost</span><span class="o">+</span><span class="dl">"</span><span class="s2">/counter.php?action=add&id=</span><span class="dl">"</span><span class="o">+</span><span class="nx">visitors</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="nx">id</span><span class="p">,</span><span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">){</span>
|
||||
<span class="nx">visitors</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="nx">innerHTML</span><span class="o">=</span><span class="nb">Number</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
|
||||
<span class="p">});</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">.visitors</span><span class="dl">'</span><span class="p">).</span><span class="nx">length</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="nx">addCount</span><span class="p">();</span>
|
||||
<span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">.visitors-index</span><span class="dl">'</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">){</span>
|
||||
<span class="nx">showHitCount</span><span class="p">();</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div></div>
|
||||
<p>2021.03.23更新:修复了一些BUG并且支持异步了</p>
|
||||
<h2 id="后端部分">
|
||||
|
||||
|
||||
<a href="#后端部分"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 后端部分
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<p>MySQL建表:</p>
|
||||
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="nv">`counter`</span> <span class="p">(</span>
|
||||
<span class="nv">`url`</span> <span class="nb">char</span><span class="p">(</span><span class="mi">50</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
|
||||
<span class="nv">`counter`</span> <span class="nb">int</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
|
||||
<span class="k">UNIQUE</span> <span class="k">KEY</span> <span class="nv">`url`</span> <span class="p">(</span><span class="nv">`url`</span><span class="p">)</span>
|
||||
<span class="p">);</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>PHP:</p>
|
||||
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?php</span>
|
||||
<span class="nb">header</span><span class="p">(</span><span class="s1">'Access-Control-Allow-Origin: *'</span><span class="p">);</span>
|
||||
<span class="nv">$db</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">PDO</span><span class="p">(</span><span class="s2">"mysql:host=MySQL地址;dbname=数据库名"</span><span class="p">,</span> <span class="s2">"用户名"</span><span class="p">,</span> <span class="s2">"密码"</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="no">PDO</span><span class="o">::</span><span class="no">ATTR_PERSISTENT</span> <span class="o">=></span> <span class="kc">true</span><span class="p">));</span>
|
||||
|
||||
<span class="k">if</span> <span class="p">(</span><span class="k">isset</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'id'</span><span class="p">])){</span>
|
||||
<span class="nv">$hid</span> <span class="o">=</span> <span class="p">(</span><span class="n">string</span><span class="p">)</span><span class="nb">md5</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'id'</span><span class="p">]);</span>
|
||||
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
|
||||
<span class="nb">header</span><span class="p">(</span><span class="s2">"HTTP/1.1 301 Moved Permanently"</span><span class="p">);</span>
|
||||
<span class="nb">header</span><span class="p">(</span><span class="s2">"Location: https://mabbs.github.io"</span><span class="p">);</span>
|
||||
<span class="k">exit</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="nv">$select</span> <span class="o">=</span> <span class="nv">$db</span><span class="o">-></span><span class="nf">prepare</span><span class="p">(</span><span class="s2">"SELECT IFNULL((SELECT `counter` FROM `counter` WHERE `url` = ?), 0) count"</span><span class="p">);</span>
|
||||
<span class="nv">$select</span><span class="o">-></span><span class="nf">execute</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="nv">$hid</span><span class="p">));</span>
|
||||
<span class="nv">$counter</span> <span class="o">=</span> <span class="nv">$select</span><span class="o">-></span><span class="nf">fetch</span><span class="p">(</span><span class="no">PDO</span><span class="o">::</span><span class="no">FETCH_ASSOC</span><span class="p">)[</span><span class="s1">'count'</span><span class="p">];</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="k">isset</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'action'</span><span class="p">])){</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'action'</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"add"</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="nv">$counter</span> <span class="o">=</span> <span class="nv">$counter</span> <span class="o">+</span> <span class="mi">1</span><span class="p">;</span>
|
||||
<span class="nv">$insert</span> <span class="o">=</span> <span class="nv">$db</span><span class="o">-></span><span class="nf">prepare</span><span class="p">(</span><span class="s2">"INSERT INTO `counter` (`url`, `counter`) VALUES (?, ?) ON DUPLICATE KEY UPDATE `counter` = ?"</span><span class="p">);</span>
|
||||
<span class="nv">$insert</span><span class="o">-></span><span class="nf">execute</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="nv">$hid</span><span class="p">,</span> <span class="nv">$counter</span><span class="p">,</span> <span class="nv">$counter</span><span class="p">));</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">echo</span> <span class="nv">$counter</span><span class="p">;</span>
|
||||
</code></pre></div></div>
|
||||
<p>2022.07.26更新:之前的代码实在是太垃圾了,现在最起码PHP也会的差不多了,稍微优化一下。</p>
|
||||
<h1 id="结果">
|
||||
|
||||
|
||||
<a href="#结果"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 结果
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>看来还是自己写代码放心,至少服务是自己维护的,不像垃圾LeanCloud坏掉之后我就无能为力了…… </p><p>
|
||||
不过说实话我根本不会JS(虽然我之前说我学这个),编写之中遇到了不少问题,所以在此感谢各位帮助我的各位大佬们,让我最终完成了这个计数器。</p></main>
|
||||
|
||||
|
||||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%AE%A1%E6%95%B0%E5%99%A8"><em>计数器</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2019-06-22-counter.md">查看原始文件</a></span></small>
|
||||
|
||||
|
||||
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
|
||||
<p id="suggest-container">Loading...</p>
|
||||
<script>
|
||||
var suggest = $("#suggest-container");
|
||||
$.get(BlogAPI + "/suggest?id=/2019/06/22/counter.html&update=" + lastUpdated.valueOf(), function (data) {
|
||||
if (data.length) {
|
||||
getSearchJSON(function (search) {
|
||||
suggest.empty();
|
||||
var searchMap = {};
|
||||
for (var i = 0; i < search.length; i++) {
|
||||
searchMap[search[i].url] = search[i];
|
||||
}
|
||||
|
||||
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
|
||||
for (var j = 0; j < data.length; j++) {
|
||||
var item = searchMap[data[j].id];
|
||||
if (item) {
|
||||
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
|
||||
var contentPreview = item.content.substring(0, 100);
|
||||
if (item.content.length > 100) {
|
||||
contentPreview += "……";
|
||||
}
|
||||
link.hover(
|
||||
function(e) {
|
||||
tooltip.text($(this).data('content'))
|
||||
.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
})
|
||||
.show();
|
||||
},
|
||||
function() {
|
||||
tooltip.hide();
|
||||
}
|
||||
).mousemove(function(e) {
|
||||
tooltip.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
});
|
||||
}).data('content', contentPreview);
|
||||
|
||||
suggest.append(link);
|
||||
suggest.append(' - ' + item.date + '<br />');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
suggest.html("暂无推荐文章……");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<div class="pagination">
|
||||
|
||||
<span class="prev">
|
||||
<a href="/2019/06/11/encrypt.html">
|
||||
上一篇:Jekyll也可以加密文章啦!
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
|
||||
<span class="next">
|
||||
<a href="/2019/06/24/up.html">
|
||||
下一篇:如何利用MySQL数据库制作一个图站
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||||
<script src="/assets/js/gitalk.min.js"></script>
|
||||
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
repo: 'mabbs.github.io',
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '/2019/06/22/counter', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<!-- <![endif]-->
|
||||
|
||||
</section>
|
||||
<!--[if !IE]> -->
|
||||
<div id="landlord" style="left:5px;bottom:0px;">
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<form id="live_talk_input_form">
|
||||
<div class="live_talk_input_name_body" >
|
||||
<input type="checkbox" id="load_this" />
|
||||
<input type="hidden" id="post_id" value="/2019/06/22/counter.html" />
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||||
<div class="live_ico_box" style="display:none;">
|
||||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||||
<input id="duType" value="douqilai" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||||
<!-- <![endif]-->
|
||||
<footer>
|
||||
<p>
|
||||
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数:617672 - 文章数:179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/js/scale.fix.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
<script src="/assets/js/main_new.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
391
2019/06/24/up.html
Normal file
391
2019/06/24/up.html
Normal file
@@ -0,0 +1,391 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>如何利用MySQL数据库制作一个图站 | Mayx的博客</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="如何利用MySQL数据库制作一个图站" />
|
||||
<meta name="author" content="mayx" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta name="description" content="最近白嫖了一个500GB的数据库,想想怎么利用一下?" />
|
||||
<meta property="og:description" content="最近白嫖了一个500GB的数据库,想想怎么利用一下?" />
|
||||
<meta property="og:site_name" content="Mayx的博客" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:published_time" content="2019-06-24T00:00:00+08:00" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="如何利用MySQL数据库制作一个图站" />
|
||||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2019-06-24T00:00:00+08:00","datePublished":"2019-06-24T00:00:00+08:00","description":"最近白嫖了一个500GB的数据库,想想怎么利用一下?","headline":"如何利用MySQL数据库制作一个图站","mainEntityOfPage":{"@type":"WebPage","@id":"/2019/06/24/up.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2019/06/24/up.html"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
<link rel="canonical" href="https://mabbs.github.io/2019/06/24/up.html" />
|
||||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||||
<!-- <![endif]-->
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||||
<link rel="me" href="https://github.com/Mabbs" />
|
||||
<script src="/assets/js/jquery.min.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
</script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-137710294-1');
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||||
<!-- <![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||||
<div class="wrapper">
|
||||
<header class="h-card">
|
||||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||||
|
||||
|
||||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||||
|
||||
|
||||
<p class="p-note">Mayx's Home Page</p>
|
||||
|
||||
<form action="/search.html">
|
||||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||||
|
||||
<ul class="downloads">
|
||||
|
||||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||||
|
||||
</ul>
|
||||
</header>
|
||||
<section class="h-entry">
|
||||
|
||||
<small><time class="date dt-published" datetime="2019-06-24T00:00:00+08:00">24 June 2019</time> - 字数统计:2209 - 阅读大约需要8分钟 - Hits: <span id="/2019/06/24/up.html" class="visitors">Loading...</span></small>
|
||||
<h1 class="p-name">如何利用MySQL数据库制作一个图站</h1>
|
||||
|
||||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||||
<div id="outdate" style="display:none;">
|
||||
<hr /><p>
|
||||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
daysold = Math.floor((new Date().getTime() - new Date("Mon, 24 Jun 2019 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||||
if (daysold > 90) {
|
||||
document.getElementById("outdate").style.display = "block";
|
||||
document.getElementById("outime").innerHTML = daysold;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
|
||||
<b>AI摘要</b>
|
||||
<p id="ai-output">这篇文章讲述了如何利用MySQL数据库创建一个简单的图站服务。首先,作者介绍了如何建立了一个名为`FileUP`的数据库表,用于存储文件信息如文件名、内容和大小。接着,PHP代码展示了处理文件上传、查询和下载的过程,提到了MySQL的文件大小限制(大约16MB),以及存在的断点续传问题。作者提到想通过切片上传技术来解决文件大小限制,但需前端支持,并给出了一个WebUploader的链接。文章最后提到暂时不打算改进这个方案,但可能会继续思考如何实现断点续传。</p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
<ul><li><a href="#talk-is-cheapshow-me-the-code">Talk is cheap,show me the code</a></li><li><a href="#缺点">缺点</a></li><li><a href="#演示随时gg">演示(随时GG)</a></li><li><a href="#下一步改进的打算">下一步改进的打算</a></li></ul>
|
||||
<hr />
|
||||
|
||||
|
||||
<main class="post-content e-content" role="main"><p>最近白嫖了一个500GB的数据库,想想怎么利用一下?<!--more--></p>
|
||||
<h1 id="talk-is-cheapshow-me-the-code">
|
||||
|
||||
|
||||
<a href="#talk-is-cheapshow-me-the-code"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> Talk is cheap,show me the code
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<p>数据库建表:</p>
|
||||
<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="nv">`FileUP`</span> <span class="p">(</span>
|
||||
<span class="nv">`ID`</span> <span class="nb">int</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="n">AUTO_INCREMENT</span><span class="p">,</span>
|
||||
<span class="nv">`Name`</span> <span class="nb">text</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
|
||||
<span class="nv">`File`</span> <span class="nb">longblob</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
|
||||
<span class="nv">`Size`</span> <span class="nb">int</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
|
||||
<span class="k">PRIMARY</span> <span class="k">KEY</span> <span class="p">(</span><span class="nv">`ID`</span><span class="p">)</span>
|
||||
<span class="p">)</span> <span class="n">ENGINE</span><span class="o">=</span><span class="n">InnoDB</span> <span class="k">DEFAULT</span> <span class="n">CHARSET</span><span class="o">=</span><span class="n">gb2312</span><span class="p">;</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>PHP代码:</p>
|
||||
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?php</span>
|
||||
<span class="nv">$con</span><span class="o">=</span><span class="nb">mysqli_connect</span><span class="p">(</span><span class="s2">"数据库地址"</span><span class="p">,</span><span class="s2">"用户名"</span><span class="p">,</span><span class="s2">"密码"</span><span class="p">,</span><span class="s2">"数据库名"</span><span class="p">);</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nf">mysqli_connect_errno</span><span class="p">(</span><span class="nv">$con</span><span class="p">))</span>
|
||||
<span class="p">{</span>
|
||||
<span class="k">die</span><span class="p">(</span><span class="s2">"连接 MySQL 失败: "</span> <span class="mf">.</span> <span class="nf">mysqli_connect_error</span><span class="p">());</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="k">if</span> <span class="p">(</span> <span class="nv">$_GET</span><span class="p">[</span><span class="no">ID</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">''</span> <span class="p">)</span> <span class="p">{</span>
|
||||
<span class="nb">header</span><span class="p">(</span><span class="s1">'Access-Control-Allow-Origin: *'</span><span class="p">);</span>
|
||||
<span class="nv">$sql</span> <span class="o">=</span> <span class="s2">"SELECT * FROM `FileUP` WHERE `ID` = '"</span><span class="mf">.</span><span class="nb">addslashes</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="no">ID</span><span class="p">])</span><span class="mf">.</span><span class="s2">"' "</span><span class="p">;</span>
|
||||
<span class="nv">$result</span> <span class="o">=</span> <span class="nv">$con</span><span class="o">-></span><span class="nf">query</span><span class="p">(</span><span class="nv">$sql</span><span class="p">);</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nv">$result</span><span class="o">-></span><span class="n">num_rows</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="k">while</span><span class="p">(</span><span class="nv">$row</span> <span class="o">=</span> <span class="nv">$result</span><span class="o">-></span><span class="nf">fetch_assoc</span><span class="p">()){</span>
|
||||
<span class="nb">Header</span> <span class="p">(</span> <span class="s2">"Content-type: application/octet-stream"</span> <span class="p">);</span>
|
||||
<span class="nb">Header</span> <span class="p">(</span> <span class="s2">"Accept-Ranges: bytes"</span> <span class="p">);</span>
|
||||
<span class="nb">Header</span> <span class="p">(</span> <span class="s2">"Accept-Length: "</span> <span class="mf">.</span> <span class="nv">$row</span><span class="p">[</span><span class="s2">"Size"</span><span class="p">]</span> <span class="p">);</span>
|
||||
<span class="nb">Header</span> <span class="p">(</span> <span class="s2">"Content-Disposition: attachment; filename="</span> <span class="mf">.</span> <span class="nv">$row</span><span class="p">[</span><span class="s2">"Name"</span><span class="p">]</span> <span class="p">);</span>
|
||||
<span class="k">echo</span> <span class="nv">$row</span><span class="p">[</span><span class="s2">"File"</span><span class="p">];</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">else</span> <span class="p">{</span>
|
||||
<span class="nb">header</span><span class="p">(</span><span class="s1">'HTTP/1.1 404 NOT FOUND'</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
|
||||
<span class="k">echo</span> <span class="s1">'<title>Mayx图床</title>
|
||||
<h1>Mayx图床</h1><hr>
|
||||
请选择需要上传的文件
|
||||
<form enctype="multipart/form-data" method="post" action="">
|
||||
<input type="file" name="File" />
|
||||
<input type="submit" name="submit" value="submit" />
|
||||
</form>
|
||||
<br />'</span><span class="p">;</span>
|
||||
<span class="k">if</span> <span class="p">(</span> <span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'REQUEST_METHOD'</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"POST"</span> <span class="p">)</span> <span class="p">{</span>
|
||||
<span class="nv">$error</span> <span class="o">=</span> <span class="nv">$_FILES</span><span class="p">[</span><span class="s1">'File'</span><span class="p">][</span><span class="s1">'error'</span><span class="p">];</span>
|
||||
<span class="nv">$tmp_name</span> <span class="o">=</span> <span class="nv">$_FILES</span><span class="p">[</span><span class="s1">'File'</span><span class="p">][</span><span class="s1">'tmp_name'</span><span class="p">];</span>
|
||||
<span class="nv">$size</span> <span class="o">=</span> <span class="nv">$_FILES</span><span class="p">[</span><span class="s1">'File'</span><span class="p">][</span><span class="s1">'size'</span><span class="p">];</span>
|
||||
<span class="nv">$name</span> <span class="o">=</span> <span class="nv">$_FILES</span><span class="p">[</span><span class="s1">'File'</span><span class="p">][</span><span class="s1">'name'</span><span class="p">];</span>
|
||||
<span class="k">print</span><span class="p">(</span><span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">);</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nv">$error</span> <span class="o">==</span> <span class="no">UPLOAD_ERR_OK</span> <span class="o">&&</span> <span class="nv">$size</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="nv">$fp</span> <span class="o">=</span> <span class="nb">fopen</span><span class="p">(</span><span class="nv">$tmp_name</span><span class="p">,</span> <span class="s1">'r'</span><span class="p">);</span>
|
||||
<span class="nv">$content</span> <span class="o">=</span> <span class="nb">fread</span><span class="p">(</span><span class="nv">$fp</span><span class="p">,</span> <span class="nv">$size</span><span class="p">);</span>
|
||||
<span class="nb">fclose</span><span class="p">(</span><span class="nv">$fp</span><span class="p">);</span>
|
||||
<span class="nv">$content</span> <span class="o">=</span> <span class="nb">addslashes</span><span class="p">(</span><span class="nv">$content</span><span class="p">);</span>
|
||||
<span class="nv">$sql</span> <span class="o">=</span> <span class="s2">"INSERT INTO `FileUP` (`Name`, `File`, `Size`)
|
||||
VALUES ('"</span><span class="mf">.</span><span class="nv">$name</span><span class="mf">.</span><span class="s2">"', '"</span><span class="mf">.</span><span class="nv">$content</span><span class="mf">.</span><span class="s2">"', '"</span><span class="mf">.</span><span class="nv">$size</span><span class="mf">.</span><span class="s2">"');"</span><span class="p">;</span>
|
||||
<span class="nv">$con</span><span class="o">-></span><span class="nf">query</span><span class="p">(</span><span class="nv">$sql</span><span class="p">);</span>
|
||||
<span class="nv">$sql</span> <span class="o">=</span> <span class="s2">"select @@identity;"</span><span class="p">;</span>
|
||||
<span class="nv">$result</span> <span class="o">=</span> <span class="nv">$con</span><span class="o">-></span><span class="nf">query</span><span class="p">(</span><span class="nv">$sql</span><span class="p">);</span>
|
||||
<span class="k">while</span><span class="p">(</span><span class="nv">$row</span> <span class="o">=</span> <span class="nv">$result</span><span class="o">-></span><span class="nf">fetch_assoc</span><span class="p">())</span> <span class="p">{</span>
|
||||
<span class="k">echo</span> <span class="s1">'上传完成,文件下载地址:<a href="//'</span><span class="mf">.</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'HTTP_HOST'</span><span class="p">]</span><span class="mf">.</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'REQUEST_URI'</span><span class="p">]</span><span class="mf">.</span><span class="s2">"?ID="</span><span class="mf">.</span><span class="nv">$row</span><span class="p">[</span><span class="s1">'@@identity'</span><span class="p">]</span><span class="mf">.</span><span class="s1">'" >'</span><span class="mf">.</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'HTTP_X_FORWARDED_PROTO'</span><span class="p">]</span><span class="mf">.</span><span class="s1">'://'</span><span class="mf">.</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'HTTP_HOST'</span><span class="p">]</span><span class="mf">.</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">'REQUEST_URI'</span><span class="p">]</span><span class="mf">.</span><span class="s2">"?ID="</span><span class="mf">.</span><span class="nv">$row</span><span class="p">[</span><span class="s1">'@@identity'</span><span class="p">]</span><span class="mf">.</span><span class="s1">'</a>'</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
|
||||
<span class="k">echo</span> <span class="s2">"文件上传错误!"</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="k">echo</span> <span class="s1">'<hr />
|
||||
<center><a href="https://mabbs.github.io/">By Mayx</a></center>'</span><span class="p">;</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="nf">mysqli_close</span><span class="p">(</span><span class="nv">$con</span><span class="p">);</span>
|
||||
</code></pre></div></div>
|
||||
<h1 id="缺点">
|
||||
|
||||
|
||||
<a href="#缺点"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 缺点
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p><del>MySQL保存文件有限制,好像只能存16MB左右😓</del>(改max_allowed_packet就可以了) </p><p>
|
||||
另外就是断点续传的问题,这个问题我回头再想一想吧。</p>
|
||||
<h1 id="演示随时gg">
|
||||
|
||||
|
||||
<a href="#演示随时gg"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 演示(随时GG)
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p><a href="https://mayx.leanapp.cn/up.php">https://mayx.leanapp.cn/up.php</a></p>
|
||||
<h1 id="下一步改进的打算">
|
||||
|
||||
|
||||
<a href="#下一步改进的打算"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 下一步改进的打算
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p><del>想搞成切片上传,这样就没有文件大小上传的限制了。 </p><p>
|
||||
不过这个好像得前端支持,先放个链接在这里吧:<a href="https://github.com/fex-team/webuploader">https://github.com/fex-team/webuploader</a></del> </p><p>
|
||||
不打算改进了……</p></main>
|
||||
|
||||
|
||||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=MySQL"><em>MySQL</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E6%95%B0%E6%8D%AE%E5%BA%93"><em>数据库</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E5%9B%BE%E7%AB%99"><em>图站</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=PHP"><em>PHP</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2019-06-24-up.md">查看原始文件</a></span></small>
|
||||
|
||||
|
||||
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
|
||||
<p id="suggest-container">Loading...</p>
|
||||
<script>
|
||||
var suggest = $("#suggest-container");
|
||||
$.get(BlogAPI + "/suggest?id=/2019/06/24/up.html&update=" + lastUpdated.valueOf(), function (data) {
|
||||
if (data.length) {
|
||||
getSearchJSON(function (search) {
|
||||
suggest.empty();
|
||||
var searchMap = {};
|
||||
for (var i = 0; i < search.length; i++) {
|
||||
searchMap[search[i].url] = search[i];
|
||||
}
|
||||
|
||||
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
|
||||
for (var j = 0; j < data.length; j++) {
|
||||
var item = searchMap[data[j].id];
|
||||
if (item) {
|
||||
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
|
||||
var contentPreview = item.content.substring(0, 100);
|
||||
if (item.content.length > 100) {
|
||||
contentPreview += "……";
|
||||
}
|
||||
link.hover(
|
||||
function(e) {
|
||||
tooltip.text($(this).data('content'))
|
||||
.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
})
|
||||
.show();
|
||||
},
|
||||
function() {
|
||||
tooltip.hide();
|
||||
}
|
||||
).mousemove(function(e) {
|
||||
tooltip.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
});
|
||||
}).data('content', contentPreview);
|
||||
|
||||
suggest.append(link);
|
||||
suggest.append(' - ' + item.date + '<br />');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
suggest.html("暂无推荐文章……");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<div class="pagination">
|
||||
|
||||
<span class="prev">
|
||||
<a href="/2019/06/22/counter.html">
|
||||
上一篇:如何自己写一个博客计数器
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
|
||||
<span class="next">
|
||||
<a href="/2019/07/01/mabbs.html">
|
||||
下一篇:重建MaBBS的计划
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||||
<script src="/assets/js/gitalk.min.js"></script>
|
||||
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
repo: 'mabbs.github.io',
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '/2019/06/24/up', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<!-- <![endif]-->
|
||||
|
||||
</section>
|
||||
<!--[if !IE]> -->
|
||||
<div id="landlord" style="left:5px;bottom:0px;">
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<form id="live_talk_input_form">
|
||||
<div class="live_talk_input_name_body" >
|
||||
<input type="checkbox" id="load_this" />
|
||||
<input type="hidden" id="post_id" value="/2019/06/24/up.html" />
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||||
<div class="live_ico_box" style="display:none;">
|
||||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||||
<input id="duType" value="douqilai" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||||
<!-- <![endif]-->
|
||||
<footer>
|
||||
<p>
|
||||
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数:617672 - 文章数:179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/js/scale.fix.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
<script src="/assets/js/main_new.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user