Coder Social home page Coder Social logo

simgo's Introduction

simgo

Micro-Framework. This is a simple and attractive library will help you to write php code more clear and easy!

The library is fully documented, and is easy to understand, I'm looking for improving and facilitating the writing of php. Have to play with the programming languages ​​they are old and everything is part of history!

First, you have to include the library in your project. to use it!

<?php
include "simgo.php"; // simgo on!
?>

go();

// Example: "echo" It serves to print, but many people criticize it. here use go(""); printable!
$test = "Blue chickens";
go($test);
// simple text
go("Hi I'm chicken"); 

page("");

// Example: To replace the ugly "include or require"
page("header.php");
page("connection.php", 2);
page("logic/math.php");
page("view/footer.php", 3);

clean();

// Example: This is the replacement of htmlentities but more strong against the Cross-site scripting (XSS)!
$xss = clean("<script>alert(1337);</script>");
go($xss); 
// or but it is better to use goClean(); When not using variables. This print direct!
goClean("<script>alert(1337);</script>");  /* = */ go(clean("<script>alert(1337);</script>"));

filter();

// Example: Single xss and special here in simgo cleaning filter! 
$xss = filter("<script>alert("xss");</script>");
go($xss); 
// A good cleaning 
goFilter("<script>alert("xss");</script>");  /* = */ go(filter("<script>alert("xss");</script>"));

get(); & post("");

// Example: It's boring to always write $_GET["chicken"]; or $_POST["chicken"]; This is already in the past. now is get("chicken"); and post("chicken");
$request = get("chicken");
go($request);
// a little sexy!
goGet("chicken");  /* GET printing /* = */ go(get("chicken"));
goPost("chicken"); /* POST printing /* = */ go(post("chicken"));

email();

// Example: Protection of email to prevent spam-bots and sniff. ;)
$mail = email("[email protected]");
go($mail);
// When print direct!
goEmail("[email protected]"); /* = */ go(email("[email protected]"));

fus();

// Example: Prevent sniffing of text, and also obfuscate! 3:
$text = fus("Insert text to protect");
go($text);
// When print direct!
goFus("Insert text to protect"); /* = */ go(fus("Insert text to protect"));

goHeader(); & redirect();

// Example: Customization and replacement of header() by goHeader() 
goHeader("X-Frame-Options: DENY"); /* or */ goHeader("Location: http://example.com");

// with redirect(); everything changes
// Redirection to URL or directory
redirect("http://example.com"); /* directory */  redirect("test");

ajax();

// Example: Support for AJAX requests php!
// used in this way, is more simple.
if (ajax()) {
    // your code here! :*
}

baseUrl(); & currentUrl();

// Example: Management of "base url" and "current url"
baseUrl();
currentUrl();
// and ready!
  • These two functions are information and documentation!

author(); & version();

// author(); and goAuthor(); = Jose Pino
// version(); and goVersion(); = the version most recent simgo!

This is a drop of water, to facilitate the writing a bit of code and be happy! :D

Happy code!


Copyright, 2014 by Jose Pino


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.