Skip to content
PHP Library for interacting with the 1MB API
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
1mbsite.php
LICENSE
README.md

README.md

1mbsite PHP

This is a PHP library for communicating with 1mbsite's API. The first step is including 1mbsite.php in your script like so:

include("1mbsite.php");

Log in to your account by clicking here. Click the "API" button in your account settings to view your API key.

Examples

Verify your API key

verifyKey("your username", "your api key");

This function returns true on success. Otherwise an error string which you can find more info about in API documentation.

Deploy to your site

deploy("your username", "your api key", "index.html", "<h1>Hello, World!</h1>");

This function returns true on success. Otherwise an error string which you can find more info about in API documentation.

View your site

viewSite("site name", "resource");

This function returns the content of resource on success. Otherwise an error string which you can find more info about in API documentation.

You can’t perform that action at this time.