diff --git a/albums.css b/albums.css
new file mode 100644
index 0000000..412cff1
--- /dev/null
+++ b/albums.css
@@ -0,0 +1,306 @@
+body {
+ font-family: "GoogleSans", sans-serif;
+ /* background-image: linear-gradient(to right top, #3d5b88, #004f68, #003e41, #0e2c20, #131907); */
+ /* background-color: silver; */
+ background: linear-gradient(
+ 0deg,
+ rgba(2, 0, 36, 1) 0%,
+ rgba(21, 110, 117, 1) 35%,
+ rgba(21, 141, 93, 1) 100%
+ ) !important;
+
+ min-height: 100vh;
+ color: white;
+ /* text-align: center;/ */
+}
+.accordion {
+ border: 4px solid white;
+ border-radius: 15px;
+ font-size: 10px;
+ background-color: #fcfbfa;
+}
+.accordion-item {
+ margin: 4px;
+}
+.accordion-button {
+ font-size: 15px;
+ text-align: center;
+ background: rgb(158, 84, 194);
+ background: linear-gradient(
+ 0deg,
+ rgba(158, 84, 194, 1) 0%,
+ rgba(104, 57, 104, 1) 35%,
+ rgba(114, 52, 109, 1) 100%
+ );
+ color: #fcfbfa !important;
+}
+
+.cnt {
+ min-height: 200px;
+}
+.modal-content {
+ background-color: #158d5d !important;
+}
+.tab-content {
+ margin-top: 100px !important;
+ z-index: 20;
+}
+
+.nav-tabs .nav-item.show .nav-link,
+.nav-tabs .nav-link.active {
+ background-color: #158d5d !important;
+ border-bottom: none;
+}
+.tab-content > .active {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ border-bottom: none;
+ min-height: 100vh;
+ background: linear-gradient(
+ 0deg,
+ rgba(2, 0, 36, 1) 0%,
+ rgba(21, 110, 117, 1) 35%,
+ rgba(21, 141, 93, 1) 100%
+ ) !important;
+}
+/* full screen div start */
+
+.fullscreen {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ z-index: 10;
+ overflow: auto;
+ background: rgb(2, 0, 36);
+ background: linear-gradient(
+ 90deg,
+ rgba(2, 0, 36, 1) 0%,
+ rgba(9, 9, 121, 1) 35%,
+ rgb(47, 0, 255) 100%
+ );
+ display: none;
+}
+/* full screen div end */
+
+.pd {
+ padding: 10px;
+ margin: 10px;
+}
+.light {
+ opacity: 0.4;
+}
+
+.statBox {
+ color: white;
+}
+h1 {
+ color: #fcfbfa;
+}
+.showcase {
+ /* background-color: #8186a3; */
+ margin: 0;
+ zoom: 84%;
+}
+
+.container_foto {
+ background-color: rgba(57, 62, 93, 1.2);
+ border-radius: 10px 10px 0px 0px;
+ padding: 0;
+ overflow: hidden;
+ position: relative;
+ max-width: 270px;
+ max-width: "100%";
+ margin: 5px;
+}
+
+.container_foto article {
+ padding: 5%;
+ text-align: left;
+ background-color: rgb(105, 105, 105, 0.7);
+ /* background-image: linear-gradient(rgba(10,0,0,0.1), rgba(0,191,255,0.9)); */
+ /* padding-top: 0 !important; */
+ height: 140px;
+ /* width: 350px; */
+ position: absolute;
+ bottom: 0;
+ z-index: 1;
+ -webkit-transition: all 0.5s ease;
+ -moz-transition: all 0.5s ease;
+ -o-transition: all 0.5s ease;
+ -ms-transition: all 0.5s ease;
+ transition: all 0.5s ease;
+}
+
+.container_foto h2 {
+ color: #fff;
+ padding-top: 10px;
+ font-weight: 800;
+ font-size: 25px;
+ border-bottom: #fff solid 1px;
+}
+
+.container_foto h4 {
+ font-weight: 300;
+ color: #fff;
+ font-size: 16px;
+}
+
+.container_foto img {
+ width: 100%;
+ top: 0;
+ left: 0;
+ opacity: 0.9;
+ -webkit-transition: all 4s ease;
+ -moz-transition: all 4s ease;
+ -o-transition: all 4s ease;
+ -ms-transition: all 4s ease;
+ transition: all 4s ease;
+}
+
+.ver_mas {
+ background-color: #feb66c;
+ position: absolute;
+ text-align: center;
+ width: 100%;
+ height: 70px;
+ bottom: 0;
+ z-index: 1;
+ opacity: 0;
+ transform: translate(0px, 70px);
+ -webkit-transform: translate(0px, 70px);
+ -moz-transform: translate(0px, 70px);
+ -o-transform: translate(0px, 70px);
+ -ms-transform: translate(0px, 70px);
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -ms-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+
+.ver_mas span {
+ font-size: 40px;
+ color: #fff;
+ position: relative;
+ margin: 0 auto;
+ width: 100%;
+ top: 13px;
+}
+
+/*hovers*/
+
+.container_foto:hover {
+ cursor: pointer;
+}
+
+.container_foto:hover img {
+ opacity: 0.1;
+ transform: scale(1.5);
+}
+
+.container_foto:hover article {
+ transform: translate(0px, -69px);
+ -webkit-transform: translate(0px, -69px);
+ -moz-transform: translate(0px, -69px);
+ -o-transform: translate(0px, -69px);
+ -ms-transform: translate(0px, -69px);
+}
+
+.container_foto:hover .ver_mas {
+ transform: translate(0px, 0px);
+ -webkit-transform: translate(0px, 0px);
+ -moz-transform: translate(0px, 0px);
+ -o-transform: translate(0px, 0px);
+ -ms-transform: translate(0px, 0px);
+ opacity: 1;
+}
+/* .rem{display: none}
+.sho{display: block} */
+
+.imgthums {
+ width: 210px;
+ height: 350px !important;
+ object-fit: cover;
+ border-radius: 10px;
+}
+.carousel-item img {
+ width: 640px;
+ height: 340px;
+ object-fit: cover;
+ object-position: 50% 50%;
+}
+
+.carousel-indicators {
+ bottom: -75px;
+}
+.carousel-indicators .active {
+ background-color: #d9534f;
+}
+.device-home {
+ display: none;
+}
+.device-imac .device-power::before {
+ left: 250px !important;
+ position: absolute !important;
+}
+
+@media only screen and (max-width: 700px) {
+ /* body { background-color: lightblue5 } */
+ .showcase {
+ /* background-color: #8186a3; */
+ margin: 0;
+ zoom: 100%;
+ }
+ .container_foto {
+ margin: 7px;
+ max-width: "100%";
+ width: 45%;
+ height: 350px;
+ }
+ /* .showcase{padding-top: 10px;} */
+ .imgthums {
+ height: 520px;
+ object-fit: cover;
+ max-width: "100%";
+ zoom: 80%;
+ }
+ .tab-content {
+ margin-top: 90px !important;
+ }
+ .device {
+ transform-origin: 1% 10%;
+ transform: scale(0.6);
+ }
+ #movieTitle {
+ margin-top: -150px;
+ text-align: center;
+ }
+ .downlinks {
+ text-align: center;
+ }
+ .accordion {
+ border: 5px solid white;
+ border-radius: 10px;
+ }
+ .accordion-button {
+ font-size: 17px;
+ text-align: center;
+ }
+}
+@media only screen and (min-device-width: 900px) and (max-device-width: 2024px) and (orientation: landscape) {
+ /* For landscape layouts only */
+ .container_foto {
+ max-width: 270px;
+ height: 350px;
+ margin: 12px;
+ }
+ .imgthums {
+ height: 350px important;
+ width: 200px;
+ object-fit: cover;
+ max-width: "100%" !important;
+ zoom: 70%;
+ }
+}
diff --git a/albums.js b/albums.js
new file mode 100644
index 0000000..81f2093
--- /dev/null
+++ b/albums.js
@@ -0,0 +1,536 @@
+$(document).ready(function () {
+ $("#statBox").hide();
+ $(".tabArea").hide();
+ $("#spinnerModal").modal("show");
+ setTimeout(() => {
+ $("#spinnerModal").modal("hide");
+ }, 5000);
+ const path = $(location).attr("pathname");
+ // new Backend("Hello").data();
+ const screenWidth = screen.width;
+
+ //check auto bot initiate backup else show albumbs
+ path === "/latestmovies/dbupdateservice.php"
+ ? (new UpdateData(), $("#spinnerModal").modal("hide"))
+ : new LoadMovies().checkDatabaseAPI();
+
+ screenWidth < 700
+ ? $(".tabNav").html(`
+
+
+
+
+
+
+
+
+
'
+ `)
+ : "";
+
+ $("#dbupdateCloud").on("click", function () {
+ new LoadMovies().albumsDBupdate();
+ });
+ // clickers for filer
+ $("#nav-english-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Eng");
+ });
+ $("#nav-tamil-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Tam");
+ });
+ $("#nav-telugu-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Tel");
+ });
+ $("#nav-hindi-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Hin");
+ });
+ $("#nav-malayalam-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Mal");
+ });
+ $("#nav-kannada-tab").on("click", function () {
+ new LoadMovies().pageUpdate("Kan");
+ });
+});
+
+//retrieve stored json file on server and store as window object that can access faster later requests
+class LoadMovies {
+ constructor() {}
+
+ // update fileusing this function
+ checkDatabaseAPI = async () => {
+ try {
+ const response = await fetch(
+ window.location.href + "/src/showcaselocal.json"
+ );
+ const data = await response.json();
+ window.localStorage.setItem("albumData", JSON.stringify(data));
+ // console.log(JSON.parse(window.localStorage.getItem("albumData")));
+ this.pageUpdate("All");
+ // show toast
+ $(".toast-body").text(`Total ${data.length} movies data loaded`);
+ const toast = new bootstrap.Toast($("#liveToast"));
+ toast.show(); //toast end
+ } catch (err) {
+ console.log(err);
+ }
+ };
+
+ //pageUpdata function
+ pageUpdate = (filter) => {
+ $(".tabArea").show();
+ $("#" + filter).html("");
+ const data = JSON.parse(window.localStorage.getItem("albumData"));
+
+ const colorsArray = [
+ "rgba(0,191,255,1.0)",
+ "rgba(0,100,0,1.0)",
+ "rgba(128,0,128,1.0)",
+ "rgba(0,0,128,1.0)",
+ "rgba(255,0,0,1.0)",
+ "rgba(255,165,0,1.0)",
+ "rgba(0,0,0,1.0)",
+ ];
+
+ let tracker = 0;
+ const randomColorGenerator = () => {
+ const value = colorsArray[tracker];
+ tracker = (tracker + 1) % colorsArray.length;
+ return value;
+ };
+
+ $.each(data, async (index, val) => {
+ const ftitle =
+ (await val.title) != null
+ ? val.title
+ .replace(".mkv", "")
+ .replace(" - ESub", "")
+ .replace("- HQ Clean Aud", "")
+ .replace("HQ PreDVD", "")
+ .replace("- HQ HDRip ", "")
+ : "loading";
+ const year =
+ (await ftitle.match(/\(([^)]+)\)/)[1]) != null
+ ? ftitle.match(/\(([^)]+)\)/)[1]
+ : "year";
+ const title = await val.title
+ .toString()
+ .substring(0, ftitle.indexOf("("));
+
+ const poster =
+ (await val.thumbnail) != "default"
+ ? val.thumbnail[0]
+ : "images/gradient.jpg";
+
+ let randomColor = randomColorGenerator();
+
+ const appender = async (movie) => {
+ $("#" + movie.filter).append(`
+
+
+
+ ${movie.title}
${movie.year}
+ ${movie.ftitle}
+
+
+
+ `);
+ };
+ const passedData = {
+ randomColor: randomColor,
+ title: title,
+ year: year,
+ ftitle: ftitle,
+ poster: poster,
+ filter: filter,
+ index: index,
+ };
+ filter === "All"
+ ? appender(passedData)
+ : ["Eng", "Tam", "Tel", "Hin", "Mal", "Kan"].includes(filter) &&
+ ftitle.indexOf(filter) >= 0
+ ? appender(passedData)
+ : false;
+ }); //end of each loops
+ };
+
+ // showing modal to download content
+ downloadAlert = (curLink) => {
+ const data = JSON.parse(window.localStorage.getItem("albumData"));
+ const movie = data[curLink];
+
+ $(".carousel-inner").html("");
+ $(".carousel-indicators").html("");
+ $(".carousel").attr("data-bs-ride", "false");
+ $(".carousel").carousel("dispose");
+
+ movie.thumbnail != "default"
+ ? movie.thumbnail.map((image, index) => {
+ const actveCheck = index === 0 ? "active" : "";
+ $(".carousel-inner").append(`
+
+
+
+ `);
+ $(".carousel-indicators").append(`
+
+ `);
+ })
+ : ($(".carousel-inner").append(`
+
+
+
+ `),
+ $(".carousel-indicators").append(`
+
+ `));
+ // reset Accordian
+ $(".accordion").html("");
+
+ // adding Download links with array in movie
+ movie.torrlinks.map((mov, index) => {
+ const movieName = mov.torrName;
+ const title = movieName
+ .toString()
+ .substring(0, movieName.indexOf("("));
+ const yearMatch = movieName.match(/\(([^)]+)\)/);
+ const year = yearMatch != null ? yearMatch[1] : "year";
+ $("#movieTitle").text(title + " - " + year);
+ const movieTorent = mov.downlink;
+ const magnetLink = movie.magLinks[index];
+
+ const titleArray = movieName
+ .replace("ESub.torrent", "")
+ .replace("ESub.mkv.torrent", "")
+ .substring(movieName.indexOf(")") + 1)
+ .split(" - ");
+
+ const tagColors = [
+ "secondary",
+ "primary",
+ "success",
+ "danger",
+ "warning",
+ "info",
+ "secondary",
+ "dark",
+ ];
+
+ const titleFinaler = titleArray.map((val, index) =>
+ index == 0
+ ? val
+ : '' +
+ val +
+ ""
+ );
+
+ // writing accordian
+ $(".accordion").append(`
+
+
+
+ `);
+ });
+
+ //setting title
+ $("#downloadViewer").modal("show"); //show download Dialougue
+ $(".carousel").attr("data-bs-ride", "caousel"); // run carousal
+ $(".carousel").carousel("cycle");
+ }; // end of dwonload alert
+} //class end line
+
+class UpdateData {
+ constructor() {
+ this.albumsDBupdate();
+ }
+
+ //updates data to movie Database preparing from index page source
+ albumsDBupdate = async () => {
+ $(".tabArea").hide();
+ $("#statBox").show();
+ $("#progms").text(""), $("#work").html("");
+ this.progressBar("
Preparing.....");
+ try {
+ const response = await fetch("model.php");
+ const data = await response.text();
+ $("#total").text(5); //progress progressBar
+ $("#count").text(5);
+ this.progressBar("Parsing web page"); //display text progress
+ $("#count").text(0);
+ this.processUpdate(data);
+ } catch {
+ (err) => console.log(err);
+ }
+ };
+
+ //process html data and filter and retrn links
+ processUpdate = async (res) => {
+ var links = [];
+ const anchorTags = $(res).find(
+ "div.ipsWidget_inner.ipsPad.ipsType_richText a"
+ );
+ $("#total").text(anchorTags.length); //progress bar
+ var x = 0;
+ var y = 0;
+ var indexOfLinks = 0;
+ anchorTags.each((index, value) => {
+ const link = value.href;
+ //progressbar
+ $("#count").text(y++);
+ this.progressBar(
+ "All anchorTags " + anchorTags.length + ". working tags " + x++
+ );
+ if (link && link.includes("forums") == true) {
+ links.push(link);
+ indexOfLinks++;
+ }
+ });
+ $("#count").text(0);
+
+ // remove repeated or duplicate entries in the links array
+ const removeDuplicates = async (links) => {
+ var unique = [];
+ for (let i = 0; i < links.length; i++) {
+ if (unique.indexOf(links[i]) === -1) {
+ unique.push(links[i]);
+ }
+ $("#count").text(100);
+ this.progressBar("Fixing bad links wait...");
+ }
+ return unique;
+ };
+
+ const finalUrls = await removeDuplicates(links);
+ await this.linkPusher(finalUrls);
+ };
+
+ //making api of each working link and remove bad links
+ linkPusher = async (links) => {
+ var goodLinksBasket = [];
+ var badLinksBasket = [];
+ var totalLinks = links.length;
+ $("#total").text(totalLinks); //progress bar
+ var counting = 0;
+ // get each Movie data
+ const getMovies = async (refdata) => {
+ try {
+ const response = await fetch("getmovies.php", {
+ method: "post",
+ body: JSON.stringify(refdata),
+ });
+
+ if (!response.ok) {
+ // throw new Error(`HTTP error! status: ${response.status}`);
+ return { NotOkHttpError: response.status };
+ }
+
+ const res = await response.json();
+ return res;
+ } catch (err) {
+ // console.error(err);
+ return { CatchedHttpError: err };
+ }
+ };
+ //running throuch each link
+ $.each(links, async (index, value) => {
+ var data = await getMovies(value);
+ if (
+ data.torrlinks === null ||
+ typeof data.torrlinks === "undefined"
+ ) {
+ badLinksBasket.push(data);
+ counting += 1;
+ } else {
+ goodLinksBasket.push(data);
+ counting += 1;
+ } //end else
+
+ //progressbar
+ $("#count").text(counting);
+ this.progressBar(
+ `Grabbed
${totalLinks} links. procecced links
${counting} ${
+ typeof data.title === "undefined"
+ ? "checking..."
+ : data.title
+ }`
+ );
+
+ totalLinks === counting
+ ? (this.dbupdateonLocalitSelf(goodLinksBasket, totalLinks),
+ $("#statBox").hide())
+ : null;
+ });
+ };
+
+ //make a file to local json file for api
+ dbupdateonLocalitSelf = (data, workedLinks) => {
+ $("#statBox").show();
+ $("#work").html("");
+ try {
+ const albums = data;
+ fetch("/src/makeJson.php", {
+ method: "post",
+ body: JSON.stringify(albums),
+ }),
+ $("#progms").text(
+ `Data updating task successfully completed. Latest ${albums.length} links gathered out of ${workedLinks}.`
+ );
+ new Mailer(data.length, workedLinks);
+ // show toast
+ $(".toast-body").text(
+ `Report sent to mail. ${data.length} movies data gathered successfully`
+ );
+ const toast = new bootstrap.Toast($("#liveToast"));
+ toast.show(); //toast end
+ } catch {
+ (err) => console.log(err);
+ }
+ };
+
+ // show Progress Bar
+ progressBar = (msgtext) => {
+ var count = Number(document.getElementById("count").innerHTML); //set this on page load in a hidden field after an ajax call
+ var total = document.getElementById("total").innerHTML; //set this on initial page load
+ var pcg = Math.floor((count / total) * 100);
+ $(".progress-bar").text(pcg + "%");
+ $("#progmsg").html('' + msgtext + "
");
+ $(".progress-bar").eq(0).attr("aria-valuenow", pcg);
+ $(".progress-bar")
+ .eq(0)
+ .css("width", pcg + "%");
+ };
+} //class end line
+
+// send mail while task finish successfully
+class Mailer {
+ constructor(data, failedLinks) {
+ this.data = data;
+ this.failedLinks = failedLinks;
+ this.send();
+ }
+
+ async send() {
+ console.log("sending mail");
+ const template = await fetch(
+ window.location.origin + "/mail/template.html"
+ );
+ const mail = await template.text();
+
+ const parser = new DOMParser();
+ const mailCode = parser.parseFromString(mail, "text/html");
+
+ //debugging
+ // mailCode.querySelector("#p2").textContent = failedLinks;
+ // mailCode.querySelector("#p1").innerHTML = data;
+ // mailCode.querySelector("#p3").textContent = " ";
+ mailCode.querySelector(
+ "#heading"
+ ).innerHTML = `
Hi, I'm your Personal Assistant,
Notifying you something important!...`;
+
+ mailCode.querySelector(
+ "#p1"
+ ).textContent = `I have found ${this.failedLinks} latest links for my work`;
+
+ mailCode.querySelector(
+ "#p2"
+ ).innerHTML = `Successfully uploaded
${this.data} brand new working links after my hardwork with all downloading links in JSON API. Remain links has some issues. so, I've decided to remove bad links using my filter mechanism. Thanks for your code anyway.`;
+
+ mailCode.querySelector(
+ "#p3"
+ ).textContent = `Enjoy your time, I just uploaded working links successfully. Happy coding. I'll try my best to help your site up and running, If i found any new data I will update for sure. Your code works flawlesly 😊`;
+
+ mailCode.querySelector("#date").textContent = new Date();
+ const finalMail = mailCode.documentElement.outerHTML;
+
+ const mailObj = {
+ subject: `Data updated ${this.data}/${
+ this.failedLinks
+ } using Bot on ${new Date()}`,
+ bodyHtml: finalMail,
+ bodyPlain: `Hi, I've found ${this.data} working API links out of ${
+ this.failedLinks
+ } on ${new Date()}. Thanks for having me Sudheer. Regards, Tech Bot`,
+ };
+ try {
+ const response = await fetch(
+ window.location.origin + "/mail/mail.php",
+ {
+ method: "post",
+ body: JSON.stringify(mailObj),
+ }
+ );
+
+ if (!response.ok) {
+ throw new Error(`HTTP error! status: ${response.status}`);
+ }
+
+ const res = await response.json();
+ // looking for errors;
+ } catch (err) {
+ // console.log(err);
+ }
+ }
+} //class end
+
+// confirm update database using pass key
+const validate = () => {
+ $(".navbar-collapse").collapse("hide");
+ const key = prompt("Enter PassCode to confirm Update Progress");
+ key === "9640"
+ ? new UpdateData()
+ : alert("You are fired. I dont trust you anymore. Getout");
+};
+
+const testFunction = async (refdata) => {
+ try {
+ const response = await fetch(
+ "http://sudheer.epizy.com/src/mail/template.html"
+ );
+ const data = response.text();
+ console.log(response);
+ } catch (err) {
+ console.error(err);
+ // return { CatchedHttpError: err };
+ }
+};
+
+// testFunction(14);
diff --git a/cookie.txt b/cookie.txt
new file mode 100644
index 0000000..150e9f9
--- /dev/null
+++ b/cookie.txt
@@ -0,0 +1,4 @@
+# Netscape HTTP Cookie File
+# https://curl.haxx.se/docs/http-cookies.html
+# This file was generated by libcurl! Edit at your own risk.
+
diff --git a/dbupdateservice.php b/dbupdateservice.php
new file mode 100644
index 0000000..1258da5
--- /dev/null
+++ b/dbupdateservice.php
@@ -0,0 +1,2 @@
+loadHTML($res);
+
+ $xpath = new DOMXpath($doc);
+
+ // Finding links using torrents
+ $torrlinksDom = $xpath->query('//a[@data-fileext="torrent"]');
+ $torrData = [];
+
+ if ($torrlinksDom->item(0) === null) {
+ $result = [
+ "torrlinks" => null
+ ];
+
+ echo json_encode($result);
+ } else {
+ foreach ($torrlinksDom as $ad) {
+ // Get ad URL
+ $ad_url = $ad->getAttribute("href");
+
+ // Set current ad object as new DOMDocument object so we can parse it
+ $ad_Doc = new DOMDocument();
+ $cloned = $ad->cloneNode(true);
+ $ad_Doc->appendChild($ad_Doc->importNode($cloned, true));
+ $ypath = new DOMXPath($ad_Doc);
+
+ // Get ad title
+ $ad_title_tag = $ypath->query("//span");
+ $ad_title = trim($ad_title_tag->item(0)->nodeValue);
+ $torrData[] = [
+ "torrName" => substr(strstr($ad_title, "- "), 2),
+ "downlink" => $ad_url,
+ ];
+ }
+
+ // Finding magnet links
+ $magLinks = [];
+ foreach ($xpath->query('//a[starts-with(@href, "magnet")]/@href') as $torrLink) {
+ $magLinks[] = $torrLink->nodeValue;
+ }
+
+ // Finding images
+ $imgLinks = [];
+ foreach ($xpath->query('//div[@class="ipsType_normal ipsType_richText ipsPadding_bottom ipsContained"]/p/a/img/@src') as $imgLink) {
+ $a = $imgLink->nodeValue;
+ if (!strpos($a, "magnet") && !strpos($a, "megaphone") && !strpos($a, "gif") && !strpos($a, "uTorrent")) {
+ $imgLinks[] = $a;
+ }
+ }
+
+ if (empty($imgLinks)) {
+ $thumbsLinks = [];
+ foreach ($xpath->query('//img[@class="ipsImage_thumbnailed"]/@src') as $thumbLink) {
+ $a = $thumbLink->nodeValue;
+ if (!strpos($a, "magnet") && !strpos($a, "megaphone") && !strpos($a, "gif") && !strpos($a, "uTorrent")) {
+ $thumbsLinks[] = $a;
+ }
+ }
+ $imgLinks = $thumbsLinks;
+ }
+
+ $result = [
+ "url" => ($url === null || !isset($url) ? "default" : $url),
+ "title" => (empty($torrData) ? "default" : strstr($torrData[0]['torrName'], '.torrent', true)),
+ "thumbnail" => (empty($imgLinks) ? "default" : $imgLinks),
+ "torrlinks" => (empty($torrData) ? "default" : $torrData),
+ "magLinks" => (empty($magLinks) ? "default" : $magLinks),
+ ];
+
+ echo json_encode($result);
+ }
+}
+
+
+function get_web_page($url, $ch = null)
+{
+ $user_agent =
+ "Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0";
+
+ $options = [
+ CURLOPT_URL => $url,
+ CURLOPT_USERAGENT => $user_agent,
+ CURLOPT_COOKIEFILE => "cookie.txt",
+ CURLOPT_COOKIEJAR => "cookie.txt",
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_FOLLOWLOCATION => true,
+ CURLOPT_ENCODING => "",
+ CURLOPT_AUTOREFERER => true,
+ CURLOPT_CONNECTTIMEOUT => 120,
+ CURLOPT_TIMEOUT => 120,
+ CURLOPT_MAXREDIRS => 10,
+ ];
+
+ if ($ch === null) {
+ $ch = curl_init();
+ }
+
+ curl_setopt_array($ch, $options);
+
+ // Discard headers
+ curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($ch, $header) {
+ return strlen($header);
+ });
+
+ $content = curl_exec($ch);
+ $err = curl_errno($ch);
+ $errmsg = curl_error($ch);
+ curl_setopt($ch, CURLOPT_HEADERFUNCTION, null);
+ $header = curl_getinfo($ch);
+ $header["errno"] = $err;
+ $header["errmsg"] = $errmsg;
+ $header["content"] = $content;
+
+ return $header;
+}
diff --git a/images/bg-07.jpg b/images/bg-07.jpg
new file mode 100644
index 0000000..fe94ab9
Binary files /dev/null and b/images/bg-07.jpg differ
diff --git a/images/bg-08.jpg b/images/bg-08.jpg
new file mode 100644
index 0000000..1807eb3
Binary files /dev/null and b/images/bg-08.jpg differ
diff --git a/images/bg-09.jpg b/images/bg-09.jpg
new file mode 100644
index 0000000..bfb0ef1
Binary files /dev/null and b/images/bg-09.jpg differ
diff --git a/images/defbg.png b/images/defbg.png
new file mode 100644
index 0000000..2b6f1ea
Binary files /dev/null and b/images/defbg.png differ
diff --git a/images/gradient.jpg b/images/gradient.jpg
new file mode 100644
index 0000000..c1d20a2
Binary files /dev/null and b/images/gradient.jpg differ
diff --git a/images/image-1.png b/images/image-1.png
new file mode 100644
index 0000000..2a55794
Binary files /dev/null and b/images/image-1.png differ
diff --git a/images/image-2.png b/images/image-2.png
new file mode 100644
index 0000000..de704c0
Binary files /dev/null and b/images/image-2.png differ
diff --git a/images/image-3.png b/images/image-3.png
new file mode 100644
index 0000000..99e531a
Binary files /dev/null and b/images/image-3.png differ
diff --git a/images/image-4.png b/images/image-4.png
new file mode 100644
index 0000000..e55bc7b
Binary files /dev/null and b/images/image-4.png differ
diff --git a/images/image-6.png b/images/image-6.png
new file mode 100644
index 0000000..3c50c9c
Binary files /dev/null and b/images/image-6.png differ
diff --git a/images/magnet.png b/images/magnet.png
new file mode 100644
index 0000000..fa3aaf2
Binary files /dev/null and b/images/magnet.png differ
diff --git a/images/torrent.png b/images/torrent.png
new file mode 100644
index 0000000..908d0fd
Binary files /dev/null and b/images/torrent.png differ
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..8b0d7dd
--- /dev/null
+++ b/index.php
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
Latest Movie Downloader
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Status of the task
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Enkilum Chandrike (2023) Malayalam Proper HQ PreDVD - [1080p & 720p - x264 - 2.5GB - 1.4GB & 900MB | x264 - 700MB - 400MB & 250MB] - HQ Clean Audio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hello, world! This is a toast message.
+
+
+
+
+
+
+
+
+
+
+
+
+ Loading...
+
+
preparing for launching...
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/model.php b/model.php
new file mode 100644
index 0000000..f78ea39
--- /dev/null
+++ b/model.php
@@ -0,0 +1,50 @@
+ "GET",
+ CURLOPT_USERAGENT => $user_agent,
+ CURLOPT_COOKIEFILE => "cookie.txt",
+ CURLOPT_COOKIEJAR => "cookie.txt",
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_FOLLOWLOCATION => true,
+ CURLOPT_ENCODING => "",
+ CURLOPT_AUTOREFERER => true,
+ CURLOPT_CONNECTTIMEOUT => 120,
+ CURLOPT_TIMEOUT => 120,
+ CURLOPT_MAXREDIRS => 10,
+ ];
+
+ $ch = curl_init($url);
+ curl_setopt_array($ch, $options);
+
+ $content = curl_exec($ch);
+ if ($content === false) {
+ echo "Error: " . curl_error($ch);
+ return false;
+ }
+
+ $err = curl_errno($ch);
+ curl_reset($ch);
+
+ $header["errno"] = $err;
+ $header["content"] = $content;
+
+ return $header;
+}
+
+$url = "https://www.1tamilmv.cloud";
+$result = get_web_page($url);
+
+if ($result === false) {
+ echo "Error: failed to fetch URL";
+} elseif ($result["errno"] != 0) {
+ echo "Error: bad URL, timeout, redirect loop";
+} else {
+ $page = $result["content"];
+ // find_links($page);
+ echo $page;
+}
diff --git a/src/downloadFile.php b/src/downloadFile.php
new file mode 100644
index 0000000..b36446b
--- /dev/null
+++ b/src/downloadFile.php
@@ -0,0 +1,47 @@
+
diff --git a/src/lazyload.min.js b/src/lazyload.min.js
new file mode 100644
index 0000000..2150c2b
--- /dev/null
+++ b/src/lazyload.min.js
@@ -0,0 +1,74 @@
+(function () {
+ "use strict";
+ var lazyload = {
+ events: ["load", "orientationchange", "resize", "scroll"],
+ setOffset: function (offset) {
+ lazyload.offset = parseInt(offset, 10);
+ },
+ run: function () {
+ var i,
+ targets = document.querySelectorAll(".lazyload");
+ if (targets.length > 0) {
+ for (i = 0; i < targets.length; i++) {
+ var elem = targets[i],
+ list = elem.getAttribute("class").split(" "),
+ lazyBG = list.indexOf("lazyBG"),
+ src = elem.getAttribute("data-src"),
+ set = elem.hasAttribute("data-srcset")
+ ? elem.getAttribute("data-srcset")
+ : null,
+ rect = elem.getBoundingClientRect();
+ if (
+ rect.top <= window.innerHeight + lazyload.offset &&
+ elem.offsetParent !== null
+ ) {
+ if (lazyBG > -1) {
+ elem.style.backgroundImage = "url(" + src + ")";
+ }
+ if (lazyBG <= -1) {
+ if (src) {
+ elem.src = src;
+ }
+ if (set) {
+ elem.srcset = set;
+ elem.removeAttribute("data-srcset");
+ }
+ if (elem.tagName === "VIDEO") {
+ elem.play();
+ }
+ }
+ list.splice(list.indexOf("lazyload"), 1);
+ elem.setAttribute("class", list.join(" "));
+ elem.removeAttribute("data-src");
+ }
+ }
+ } else {
+ for (i = 0; i < lazyload.events.length; i++) {
+ window.removeEventListener(
+ lazyload.events[i],
+ lazyload.run
+ );
+ }
+ }
+ },
+ init: function (offset) {
+ var script = document.querySelector("script#lazyloadjs");
+ if (typeof offset !== "number") {
+ offset = 200;
+ }
+ if (script && script.hasAttribute("data-offset")) {
+ offset = script.getAttribute("data-offset");
+ }
+ lazyload.setOffset(offset);
+ for (var j = 0; j < lazyload.events.length; j++) {
+ window.addEventListener(
+ lazyload.events[j],
+ lazyload.run,
+ false
+ );
+ }
+ lazyload.run();
+ },
+ };
+ lazyload.init();
+})();
diff --git a/src/makeJson.php b/src/makeJson.php
new file mode 100644
index 0000000..1d93ae4
--- /dev/null
+++ b/src/makeJson.php
@@ -0,0 +1,17 @@
+