Advertisement
citstudio

Web Submiter - Part 2 - Controllers

Jun 29th, 2014
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class Pingler extends CI_Controller {
  4.  
  5.     public function __construct() {
  6.         parent::__construct();
  7.         $this->load->helper('pingler');
  8.     }
  9.  
  10.     public function ping() {
  11.         if ($this->input->server('REQUEST_METHOD') == 'POST') {
  12.             $data = $this->input->post("input");
  13.             echo submit($data["name"], $data["url"],TRUE);
  14.         } else {
  15.             redirect(base_url(), "refresh");
  16.         }
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement