Giter Club home page Giter Club logo

use0mk's Introduction

/**
 * use0mk.class.php v1.0
 *
 * 0.mk - Shorten your links!
 * http://0.mk
 * 
 * 0.mk API Documentation: http://0.mk/api
 * 
 * Newer versions of this class will be available on http://0.mk/use0mk
 */
 
USAGE:

Include the class:

	include('use0mk.class.php');

Create an object for the class:

	$use0mk = new use0mk();

If you want to login to the service add your username and apikey as parameters
when you're creating the object.

	example:
	$use0mk = new use0mk("0mkapi", "1a7854a2226925282e54d1a01af5058c");


Actions:

- Shortening long link:

	example:
	$use0mk->shortenUrl("http://google.com/");
	
	If the shortening is sucessful the function will return the short link.
	If not, you'll get the same link that you inserted.
	
- Previewing short link:

	example:
	$use0mk->previewUrl("http://0.mk/example");
	
	If the link is valid and exists in the database the function will return the 
	long link.
	If not, you'll get the same link that you inserted.
	
- Shortening all long links in a string:

	example:
	$use0mk->shortenAll("Links in string: http://google.com/ http://yahoo.com");
	
	All links in the inserted string will be sent for shortening and the old long
	links will be replaced with the new short ones. 
	If shortening of some of the links is unsucessful, this link won't be replaced.
	
	
For newer versions of the class check http://0.mk/use0mk

Happy shortening :)

use0mk's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.