MILEWISER — SIMPLE CORE PHP + MYSQL (MySQLi)

UPLOAD: Upload ALL files and folders from this ZIP directly into your domain's existing document root. index.php must sit directly in that folder. Keep the includes/ and assets/ folders as supplied. There is no public/ folder and no need to change the document root.

1. In cPanel, create a MySQL database and database user. Assign the user to the database.
2. Open phpMyAdmin, select that database, choose Import and import database.sql. If you already imported the SQL from the previous MySQL package, reuse that database; no new import is needed.
3. Edit includes/config.php. Fill db_host (usually localhost), db_port (usually 3306), db_name, db_user and db_password. Use the full names including any cPanel prefix.
4. The Auto.dev key you supplied is configured server-side in includes/config.php; AUTO_DEV_KEY can override it. Confirm site_url. NHTSA needs no key.
5. Open https://milewiser.com/ and create an account using signup.php.

Hosting: PHP 8.2+, MySQL/MariaDB, mysqli (mysqlnd), cURL and sessions. This version uses mysqli, not PDO. phpMyAdmin is the tool you use to import and manage the MySQL database. Upload hidden .htaccess files too; they protect includes/config.php and block browser access to the SQL/setup files.

Auto.dev: Live access is enabled and demo_mode is false. API availability depends on your account, key and remaining quota. The key is used only in the server-side Authorization header. Keep includes/config.php protected and do not publish it in a public repository.

Insurance: Set insurance_url to an approved HTTPS partner destination when available. Real insurer quotes are not calculated by this site. Valuations are rough asking-price ranges from comparable listings, not insurer valuations or purchase offers.

Password reset: Set mail_enabled to true only after configuring hosting mail delivery. PHP mail() sends requested reset messages; no email campaigns are sent.

Contact/unsubscribe requests are stored in the MySQL requests table, viewable through phpMyAdmin. Process opt-outs in your SMS platform as well if one is used. This package does not send SMS. Signup requires a mobile phone number and both consent boxes. Each choice and timestamp is stored independently. Users can withdraw consent through settings or the unsubscribe page.

If account services are unavailable, check the database name/user prefix, password, assigned permissions, mysqli extension and SQL import. No default account is supplied. No old account data is automatically migrated. No database credentials or test accounts are included in the ZIP. Your supplied API key is included in the protected server configuration.

HOMEPAGE LIVE LISTINGS: The bottom cards now use Auto.dev inventory only. No sample car cards are substituted. One request fetches a page of used, priced dealer inventory, and up to three active cars are shown with provider photos/prices/mileage. Inventory is shared in MySQL and refreshed every 24 hours. An updated timestamp and location appear below the cards. Provider failures show an unavailable message rather than invented inventory. Errors are retried after five minutes. Missing dealer photos use a neutral placeholder.

LOCATION: Change home_listing_zip (default 10001), home_listing_distance (100 miles), and home_listing_max_price ($35,000) in includes/config.php. Different settings generate a new cache entry. To force refresh using phpMyAdmin: TRUNCATE TABLE vehicle_listing_cache; the next homepage visit fetches inventory again and uses one API request.

DATABASE UPDATE: Existing installations automatically create the small vehicle_listing_cache table. Keep the existing account database; no reimport is required. The MySQL user needs CREATE TABLE permission. New installations should import the included database.sql as usual.

HOSTING CONNECTION CHECK: Run php check-listings.php from the website folder using cPanel Terminal. It makes one live API request and prints listing count and a few vehicle names, without printing the key. This script cannot be accessed through the browser. Ensure PHP cURL and outbound HTTPS to api.auto.dev are allowed. A live verification attempt from the build environment timed out at the outbound proxy, so the provider response and this key's current account access could not be confirmed here.

DESIGN: All PHP pages share the navy, teal and white layout, responsive navigation, SVG icons, signup popup and footer. Local Ford and used-car imagery is included.
