SOLVEEX - UPLOAD-READY PHP LANDING PAGE

Upload
1. Upload the ZIP into the desired cPanel public_html folder or subfolder.
2. Extract its contents directly there, including both .htaccess files.
3. Use PHP 8.1 or newer with cURL, sessions, JSON, and mbstring enabled.
4. The storage directory must be writable by PHP. Use 0755 or 0775 as your
   host requires; do not make private configuration publicly accessible.
5. Open the destination folder URL. DirectoryIndex selects index.php.
   An existing index.html in that folder may need to be removed or renamed.

Connected API
- Both original endpoint URLs and their account token are preserved in
  config.php, including offer 3008 and flow 33271.
- Credentials remain in PHP server code. Do not serve these files from a
  static-only host or distribute this private ZIP publicly.
- The fallback endpoint is used only if a connection fails before the POST
  is sent. An ambiguous POST is not repeated against the second endpoint.
- Flat name/phone fields are submitted; local Turkish phone formats are
  normalized to 90 + the ten-digit national number.
- country=tr, lang=tr, base=1390, currency=try, count=1 are sent server-side.
- subid, sub1-sub5, UTM tags, ttclid, fbclid, gclid and msclkid pass through.
- Customer IP uses REMOTE_ADDR. If hosting is behind Cloudflare and the origin
  trusts Cloudflare exclusively, set server environment TRUST_CLOUDFLARE=1.

Thank-you page and TikTok
- Pixel IDs: DB0UE93C77U5HCCK51DG and D5G1HK3C77U7QAMHE6TG.
- Each verified receipt loads both pixels and queues a PageView per pixel.
- Purchase is queued once per pixel for a successful new submission only.
- An accepted lead is a COD order request; the API does not confirm payment.
- Purchase settings are kept EXACTLY as supplied: value=39, currency=EUR,
  content_type=product, content_id=Diaform. These tracking settings differ
  from the visible Solveex offer (1,390 TL). Edit the purchase array in
  config.php if you want tracking to describe the displayed offer instead.
- The broken quote in the supplied code is fixed. ORDER_123 is replaced by
  CF_ plus the real API lead ID, with a stable per-pixel event_id.
- Old source-page Meta and TikTok pixel IDs are removed.
- Direct links/query parameters cannot fabricate a tracked receipt.
- Receipts require the submitting browser session and expire after 24 hours.
- Server and localStorage guards suppress Purchase on refresh/revisit.
- Purchases can still be blocked by browser privacy settings or ad blockers.

Duplicate handling
- New accepted phone submissions are deduplicated for 3 hours (10800 seconds).
- Local duplicates are not sent to the network and render no TikTok code.
- Network duplicate/trash/error responses never trigger Purchase.
- Definite API rejection releases the reservation for a corrected retry.
- If the API reply is unreadable or the submitted request times out, a
  ten-minute pending hold prevents an immediate repeat. Verify the lead in
  your network account before asking the customer to retry.
- Hashed phone records are stored in storage/, without raw names or phones.
  Keep storage/ intact across uploads to preserve the dedupe window.
- Apache .htaccess denies storage/ access. If deploying on Nginx, configure
  equivalent access denial for storage/, config.php, lib.php and README.txt.

Page assets
- Original page structure, Turkish content and visible price are preserved.
- Images, CSS and fonts are included locally (273 downloaded assets).
- WordPress/Elementor AJAX submission is replaced by the local PHP form.
- The buttons jump directly to the order form. Sticky navigation is retained.
- Footer policy/contact links remain the source site's existing links.

Checks performed
- All PHP files passed php -l; JavaScript syntax checks passed.
- Desktop (1440px) and mobile (390px) browser layouts were inspected.
- All 23 page images and local fonts loaded with external requests blocked.
- A real browser form click was tested against a LOCAL mock network API.
- Accepted, rejected, duplicate, trash, malformed, invalid phone and invalid
  session-token paths were checked, including retry and cross-session dedupe.
- Both per-pixel Purchase queues, supplied event values, unique order IDs,
  refresh guards and protected thank-you entry were verified.
- ZIP integrity and local asset references were checked.
- No real affiliate lead or live TikTok event was sent. Live network account
  permissions/offer availability and TikTok dashboard delivery are unverified.
- Built with the save-shopify-page and update-cpa-product-page skills.
