Overview #
The PHP Appstore Script is a powerful search engine that interacts with the Appstore Search API to provide users with access to Apps. This guide will walk you through the installation process to set up the script on your web server.
Prerequisites #
Before proceeding, ensure you have met the Server Requirements outlined below.
Steps #
- Download the Script
- Obtain the latest version of the PHP Appstore Script from the official source (e.g., your repository or distribution package).
- Extract the archive to a directory on your web server (e.g.,
/var/www/html/appstore
or a subdirectory likepublic_html/appstore
).
- Sign Up for an Apple Performance Partner Program Affiliate ID
- Visit https://performance-partners.apple.com/home to sign up for the Apple Performance Partner Program.
- Follow the registration process to create an account and apply for the program.
- Once approved, you will receive an Affiliate ID (e.g.,
10lFXT
). Note this ID, as it will be used to configure the script for monetization through affiliate links. - Ensure you comply with Apple’s terms and conditions for the Performance Partner Program.
- Configure the Environment
- Navigate to the script directory and locate the
config.php
file. - Open
config.php
in a text editor and update the following variables:$site_url
: Set to your domain (e.g.,https://yourdomain.com/appstore
).$site_title
: Customize the site title (e.g.,My Appstore Search
).$default_country
: Set the default country code (e.g.,us
).$affiliate_id
: Replace with your Apple Performance Partner Program affiliate ID obtained from the previous step (e.g.,10lFXT
).$bootswatch_theme
: Choose a Bootstrap theme (e.g.,darkly
) from the 27 available options.
- Navigate to the script directory and locate the
- Upload Files
- Upload all extracted files to your web server using FTP or a file manager.
- Ensure the
css/
,images/
, and other asset directories are intact.
- Set Permissions
- Set appropriate file permissions:
chmod 644 config.php
(read-only for others).- Ensure the web server user (e.g.,
www-data
orapache
) has read access to all files.
- Set appropriate file permissions:
- Test the Installation
- Access the script via your browser (e.g.,
https://yourdomain.com/appstore/
). - Verify the homepage loads, displaying top charts or a search interface.
- Check the Media dropdown and country selector for functionality.
- Access the script via your browser (e.g.,
- Troubleshooting
- If errors occur, enable debug mode by setting
$show_debug = true;
inconfig.php
to view API request URLs. - Check server logs for PHP errors (e.g.,
/var/log/apache2/error.log
).
- If errors occur, enable debug mode by setting
Additional Notes #
- The script uses Bootstrap for theming; customize the look by selecting from 27 Bootstrap themes via the
$bootswatch_theme
variable. - Affiliate links are automatically embedded with your
$affiliate_id
for monetization through the Apple Performance Partner Program.
Server Requirements #
To run the PHP Appstore Script effectively, your server must meet the following minimum requirements. These ensure compatibility with the script’s PHP codebase, API interactions, and responsive design.
Minimum Requirements #
- Operating System: Linux, macOS, or Windows (Linux recommended for stability).
- Web Server: Apache 2.4+ with
mod_rewrite
enabled, or Nginx with URL rewriting support. - PHP Version: PHP 8.1 or higher (PHP 8.1 recommended for optimal performance and security).
- Required Extensions:
curl
(for API calls to Appstore Search API).json
(for parsing API responses).mbstring
(for string handling).openssl
(for secure HTTPS requests).
- Required Extensions:
- Database: Not required (script uses API data directly).
- Memory: Minimum 128MB RAM (256MB recommended for handling multiple requests).
- Disk Space: Approximately 50MB for script files and assets (scalable with cached data).
- Internet Access: Stable connection for real-time API queries.
Recommended Configuration #
- PHP Settings:
memory_limit
: 256M or higher.max_execution_time
: 30 seconds or more to handle API timeouts.- Enable
error_reporting
during development for debugging.
- Server Software:
- Apache with
.htaccess
support for SEO-friendly URLs. - Optional: Composer for managing PHP dependencies (if extended functionality is added).
- Apache with
- Security: SSL/TLS certificate for HTTPS (e.g., via Let’s Encrypt) to secure affiliate links.
Verification #
- After installation, run
php -v
andphpinfo()
to confirm PHP version and extensions. - Test API connectivity by accessing a sample URL (e.g.,
https://appstore.scriptgeni.com/index.php?term=Jurassic&country=us&media=software
). - Ensure rewrite rules in
.htaccess
are active by visiting an SEO URL (e.g.,https://yourdomain.com/us/software
).
Notes #
- Adjust PHP settings in
php.ini
or via your hosting control panel. - For production, consider a CDN (e.g., Cloudflare) to cache static assets and improve performance.
- Consult your hosting provider if
mod_rewrite
or PHP extensions are unavailable.