Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: MuDownload + PHP API  (Visto 1901 veces)

thoxer and 1 Guest are viewing this topic.

Offline plyn Posteado: March 27, 2023, 02:57:15 PM | Modificado: March 27, 2023, 02:59:54 PM by plyn

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 257
  • Gracias recibida: 808
  • br
php:


<?php

define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'mysqlsa');
define('DB_PASSWORD', 'mysqlpass');
define('DB_NAME', 'mysqldb');

try {
    $pdo = new PDO("mysql:host=" . DB_SERVER . ";dbname=" . DB_NAME, DB_USERNAME, DB_PASSWORD);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    // Consulta para buscar o campo "username" da tabela "users" (vocês pode criar as tabelas do jeito que vocês acharem melhor)
    $stmt = $pdo->prepare("SELECT * FROM users");
    $stmt->execute();

    $users = $stmt->fetchAll(PDO::FETCH_ASSOC);

    echo json_encode($users);
} catch(PDOException $e) {
    echo "Erro ao buscar informações de usuário: " . $e->getMessage();
}



pra quem nao quer usar api e quer fazer conexão direta, e packear o projeto inteiro, boa sorte !

Source: https://www.mediafire.com/file/hpfg85wz10u1owk/Downloader.zip/file

https://prnt.sc/2knjRHRdUSHO

Hisashiburi dana, Mugiwara!

Gracias:


Offline andrades #1 Posteado: April 02, 2023, 11:05:07 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 4
  • Gracias recibida: 12
  • br
Me gustaría saber si qué versión de estudio.


Offline plyn #2 Posteado: April 03, 2023, 11:46:13 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 257
  • Gracias recibida: 808
  • br
Me gustaría saber si qué versión de estudio.

eu usei o 2010 para criar o projeto e o 2022 para colocar as referencias, mas acredito que qualquer versão funciona

Hisashiburi dana, Mugiwara!

Offline clockbooster #3 Posteado: October 06, 2025, 09:46:10 AM

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 153
  • Gracias recibida: 56
  • ph
how to fix this error while compiling ...
https://prnt.sc/NFhwqgyAyPKA

clockboosterPHC#1450


DISCORD

Offline plyn #4 Posteado: October 06, 2025, 05:03:45 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 257
  • Gracias recibida: 808
  • br
how to fix this error while compiling ...
https://prnt.sc/NFhwqgyAyPKA

1 - Checkusun error: Você precisa criar outra key la nas propriedades, não me lembro agora como faz, mas no chatgpt ele vai te ensinar direitinho
2 - Erro de versão das externsões, mesmo caso no gpt, ele vai te explicar corretamente como atualizar

Hisashiburi dana, Mugiwara!

Gracias:


Offline dakosmu #5 Posteado: October 07, 2025, 12:51:01 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 786
  • Gracias recibida: 12155
  • ve
Dakosmu Colaborador

Gracias:


Offline clockbooster #6 Posteado: October 10, 2025, 07:48:30 AM

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 153
  • Gracias recibida: 56
  • ph
clockboosterPHC#1450


DISCORD

Offline laurentiuitk #7 Posteado: October 10, 2025, 09:30:04 AM | Modificado: October 10, 2025, 11:32:59 AM by laurentiuitk

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 30
  • Gracias recibida: 44
  • gb

Offline plyn #8 Posteado: October 10, 2025, 09:55:30 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 257
  • Gracias recibida: 808
  • br
what you're selling, you poor guy :)) you just copy-paste, you have no idea about your life, you're so pathetic — another kid made by 10 dads and 10 of your mom’s boyfriends contributed to her!

Quem ta vendendo e o que está sendo vendido ?

Hisashiburi dana, Mugiwara!

Offline laurentiuitk #9 Posteado: October 10, 2025, 11:34:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 30
  • Gracias recibida: 44
  • gb
Quem ta vendendo e o que está sendo vendido ?
[/quote]

Sorry, please forgive me, I made a mistake, I didn’t write where I was supposed to. Sorry, bro.

Gracias:


Offline Hoangsy99 #10 Posteado: October 10, 2025, 11:50:35 AM

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • 3D Maker
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 645
  • Gracias recibida: 65267
  • vn




Descargar


any guide on how to use this ?
English ( Made by AI )
Citar
# MuEmperor Client Downloader — Usage & Customization Guide

This zip contains a **Windows Forms app (C#/.NET)** named `Downloader`. It:
1) Downloads a MU client **.zip** from your HTTP/HTTPS server.
2) **Extracts** it to `C:\<local>` (default: `C:\MuEmperor`).
3) **Creates a Desktop shortcut** to your `Launcher.exe`.

> **Note**: There is **no PHP** in this package. The app downloads directly from a static URL.

---

## 1) Run immediately (no build required)
- Go to: `MuDownload + PHP API/Downloader/publish/`
- Run `Downloader.exe` (or from `bin/Release`).
- By default it downloads `http://down.muemperor.net/MuOcean Season 6.zip` to the app folder, **extracts to** `C:\MuEmperor`, then **creates a shortcut** to `C:\MuEmperor\MuOcean Season 6\Launcher.exe` on the Desktop.

> If that URL is no longer valid, customize the code (see section 3).

---

## 2) Build from source
- Requirements: **Windows + Visual Studio 2019/2022** (.NET Desktop Dev workload).
- Open `Downloader.sln` → Build **Release**.
- Executable: `Downloader\bin\Release\Downloader.exe`.

No manual NuGet restore needed; packages are included in `packages/`.

---

## 3) Customize for your server
Open `Downloader/Form1.cs` and edit these constants (around lines 34–41):

```csharp
int beta  = 0;          // Show "Beta" in window title (0/1)
int ver   = 1;          // Display version
int patch = 0;          // Display patch

string local     = "MuEmperor";                // Install to C:\<local>
string muname    = "MuEmperor";                // UI display name
string downname  = "MuOcean Season 6.zip";     // ZIP filename on server
string bg        = "https://down.muemperor.net/N1.jpg"; // Background image URL
```

And **download URL** (around line 86):
```csharp
webClient.DownloadFileAsync(new Uri("http://down.muemperor.net/" + downname), downloadPath);
```
→ Replace with your domain, e.g.:
```csharp
webClient.DownloadFileAsync(new Uri("https://cdn.yourdomain.com/client/" + downname), downloadPath);
```

**Shortcut target after extraction** (around line 174) is currently:
```csharp
string programPath = @"C:\MuEmperor\MuOcean Season 6\Launcher.exe";
```
If your ZIP’s internal folder name differs, update this path accordingly.

---

## 4) Packaging the client ZIP
- The app uses `System.IO.Compression.ZipArchive` → it requires **.zip**, *not* `.rar`.
- Ensure the ZIP contains the same folder structure expected by your shortcut. Example:
```
MuOcean Season 6/
  Launcher.exe
  data/
  ...
```
Extracting to `C:\MuEmperor\` results in:
`C:\MuEmperor\MuOcean Season 6\Launcher.exe`

---

## 5) Permissions & common issues
- **Write access to C:\**: If restricted, change `extractPath` to Documents: 
  In `Form1.cs`, find `string extractPath = @"C:/" + local;` and replace with:
  ```csharp
  string extractPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), local);
  ```
- **Download fails**: Verify URL, HTTPS certificate, firewall.
- **Shortcut creation fails**: Try “Run as Administrator” or change shortcut location.
- **Incomplete extraction**: Validate ZIP integrity, avoid overly long paths, ensure free disk space.

---

## 6) Key code locations (quick reference)
- **UI/URL constants**: `Form1.cs` ~34–41 and ~86
- **ZIP extraction**: `Form1.cs` ~126–168 (`ZipArchive`)
- **Desktop shortcut creation**: `Form1.cs` ~170–184 (COM `WshShell`)
- **Shortcut target**: `Form1.cs` ~174 (`Launcher.exe`)

---

## 7) Optional improvements
- Move configuration (domain, ZIP name, install dir) to **app.config** or external JSON so you can change settings **without rebuilding**.
- Auto-detect top-level folder inside ZIP to generate shortcut **dynamically**, avoiding hard-coded paths.
- Add **SHA-256 checksum** verification after download.
- Show detailed progress (speed/size) and add **Pause/Resume**.

Gracias:


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate