veedeoo 474 Junior Poster Featured Poster

ok, but this one is not valid though

vendor/videojs/video.js/dist/video-js/vjs.youtube.js

video.js can't be a directory right? Here is my screenshot

9af70c7041aa00bbfb3bf5c129f33573

and the source code

<html>
<head>
<link href="//vjs.zencdn.net/4.10/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.10/video.js"></script>
<script src="videojs_youtube.js"></script>
</head>
<body>

<div id="videoContainer" class="ImageViewerContent tab-pane fade in">
<video id='videoPlayer' class="video-js vjs-default-skin vjs-big-play-centered"
data-setup='{ "techOrder": ["youtube"],
"src": "www.youtube.com/watch?v=v2AC41dglnM",
"preload":"auto",
"controls":true,
"poster":"https://i.ytimg.com/vi/v2AC41dglnM/hqdefault.jpg",
"width":450,
"height":254
}'>
<p class="vjs-no-js"><?php echo PRODUCT_VIDEO_NOT_SUPPORTED; ?></p>
</video> 

  </video>

<script type="text/javascript">
  document.createElement('video');document.createElement('audio');document.createElement('track');
</script>
</body>
</html>

The youtube plugin is from here.

veedeoo 474 Junior Poster Featured Poster

In addition, you need to check if $_GET['d1'] is set, before assigning to variable $d1. Otherwise, the parser will assume it is set. You can wrap it up like this

if(isset($_GET['d1']) && isset($_GET['d2])){

          ## rest of codes here

   }
veedeoo 474 Junior Poster Featured Poster

can you confirm that this is the right file location?

 <script src="vendor/videojs/video.js/dist/video-js/vjs.youtube.js"></script>
veedeoo 474 Junior Poster Featured Poster

This is what I meant by without iteration on conversion. I used foreach loop to prove successful conversion..

<?php 

$pass = '5f4dcc3b5aa765d61d8327deb882cf99';

print_r(str_split($pass));

$replacements = array(

  '0'=> "0000", '1' => "0001", '2' => "0010", '3' => "0011", '4' => "0100", '5' => "0101", '6'=> "0110", '7' => "0111",
  '8'=> "1000",'9' => "1001", 'a' => "1010", 'b' => "1011", 'c' => "1100", 'd' => "1101", 'e' => "1110", 'f' => "1111" );

$x = (str_replace(array_keys($replacements), $replacements, $pass));

echo '<br/> this is the converted md5 password : '. $x .'<br/>';

/*
* we can further split the converted md5 password as proof
*/
echo 'below are the split converted md5 as proof <br/>';

$x_array = (str_split($x,4));

foreach($x_array as $value){

        echo $value.'<br/>';

}

the rest is all up to you. Good luck on your Master thesis.

veedeoo 474 Junior Poster Featured Poster

IMHO, the hashed user_pass is not necessarily be the subject of un-needed iteration.

if

$md5_1=md5($_POST['user_pass']);

is equal to 'password', then the hashed password is now equal to

$md5_1 = '5f4dcc3b5aa765d61d8327deb882cf99';

and this

print_r(str_split($md5_1));

will deliver $md5_1 as an array.

Array ( [0] => 5 [1] => f [2] => 4 [3] => d [4] => c [5] => c [6] => 3 [7] => b [8] => 5 [9] => a [10] => a [11] => 7 [12] => 6 [13] => 5 [14] => d [15] => 6 [16] => 1 [17] => d [18] => 8 [19] => 3 [20] => 2 [21] => 7 [22] => d [23] => e [24] => b [25] => 8 [26] => 8 [27] => 2 [28] => c [29] => f [30] => 9 [31] => 9 ) 

just apply minor manipulation to convert those items into whatever format you want and you should be done.

Hint: Look for the array functions here. That should help you in the conversion to binary and I am sure it is a lot faster than what you have using switch statement.

veedeoo 474 Junior Poster Featured Poster

try rewriting your javascript like this

from this

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
    <div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=224643507660473";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

to this

<script src="http://connect.facebook.net/en_US/all.js#xfbml=true">

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=224643507660473";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>

<div id="fb-root"></div>

I personally tested the script above using my own app ID and it work the same as my first recommended implementation above.

If still doesn't work out for you, you will have to post your isssues on facebook developer support.

veedeoo 474 Junior Poster Featured Poster

I don't think session_start() is needed in the constructor.

If you do this after logging out

print_r($this->session->all_userdata());

do you still get something ?

You can try modifying this code

 'password' => $this->input ->post('password '),
 'logged' => 1

to this

 'password' => $this->input ->post('password'),
 'logged' => TRUE

another question I have, why do you have to store password in session. Is the member id number is not enough?

veedeoo 474 Junior Poster Featured Poster

Do you have a facebook developers account?

if so, have you created an application?

is the application set to public or development?

Here is a test app I just created 3 minutes ago and I followed the same instructions I have given you.

1612a2e13fcbfe8f6fd40840e6f3bce9

did you add the button like this?

<div class="fb-share-button" data-href="http://YourDOmainDotCom/whatever_page" data-layout="icon_link"></div>
veedeoo 474 Junior Poster Featured Poster

did you include the Javascript SDK right after the <body> tags?

for example,

<body>

    <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'Put__Your_Own_App_ID__Here',
      xfbml      : true,
      version    : 'v2.1'
    });
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>

The APP ID you need to sign-up for it on facebook website.

veedeoo 474 Junior Poster Featured Poster

I am currently testing the CodeIgniter 3.x, or you can view flavors option here.

I will be bribing my mentor and my friend to write a tutorial focusing on modularization (similar to HMVC) of codeIgniter which can truly demonstrate the great potential of CI3.

Modularization can make codeIgniter to handle many applications running in just ONE framework, while maintaining the separation of concerns. So, app1 can have template engine different than app2. App1 and App2 can have their own libraries and helpers and own preferred template engine. Applications can share common libraries, helpers, config file if necessary, and own triad directories (controllers, models and views).

veedeoo 474 Junior Poster Featured Poster

The new license for the CodeIgniter effective 12 days ago is MIT. Ref: British Columbia Institute of Technology

as shown on system/core/Controller.php updated 12 days ago.

<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* …
veedeoo 474 Junior Poster Featured Poster

I totally agree with cereal. That should work. The script from github was written by PHil Sturgeon. The same Phil who wrote the Pyro CMS build on top of CI and CI core contributor.

veedeoo 474 Junior Poster Featured Poster

Hello Soomro_moon, welcome to Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hi Lester, welcome to Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hi Shiksha welcome.

veedeoo 474 Junior Poster Featured Poster

Hi Olga welcome.

veedeoo 474 Junior Poster Featured Poster

how about this? Will it help?

veedeoo 474 Junior Poster Featured Poster

I am using the fig-standard auto loader. Pretty much all frameworks today are using the proposed loading standard.

to call static method of class with namespace, you can easily do it like this.. say we have a MyClasss with namespace

namespace App\Doer;

class MyClass
{

    public static function just_do_it()
    {
        return 'I am doing it';

    }

}

On another page we can include the class page

include_once('location_of_the_class.php');

use App\Doer as Dude;

## call the static method
 print_r(Dude\MyClass::just_do_it());
veedeoo 474 Junior Poster Featured Poster

On the dimension update, don't forget to reload your controller. Since CI has no reload function, we can easily bypass it by doing like so..

redirect('/index.php/user/jquery_library_browser_width');

try experimenting with the proper url. Normally, if you are using .htaccess, you can easily get away with simple reload like this

redirect('user/jquery_library_browser_width');
veedeoo 474 Junior Poster Featured Poster

Not sure, but you can experiment with this will give you the size of the window onload and on resize state.

The jquery part to send it to the controller is as simple as this.

Add a method for the controller

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

Class MyController extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();

     }


     public function get_window()
     {

         if (isset($_POST)){

             ## filter and assigned to session
          }   

     }

Change this part of the script on second linked script above

this

url: 'text.php',

to this

url: 'MyController/get_window',

if you think you need to use routing, please feel free to do so.

If you want the jquery to update the session, make sure to add onchange event or something. So, that when the user manually change the window size, the script get updatated.

veedeoo 474 Junior Poster Featured Poster

how about using jquery to get the browser information and then submit the collected information via ajax to the controller method and then assign them to session.

veedeoo 474 Junior Poster Featured Poster

is this google wallet related?

veedeoo 474 Junior Poster Featured Poster

@UK-1991,

thanks for your message. I am confident that broj1 can deliver the solution to your problem.

veedeoo 474 Junior Poster Featured Poster

Do as suggested by JorgeM. While waiting for the challenging questions, spend some time reading some good PHP books from O'Reilly Media.

Pretty much inspired by what I have been through after all these years.

Attempt to create an application based on what you have learned.
Critique the quality of your own codes. Evaluate your coding style, look for entries that can be refactored. Regularly update your application as you find and learn new techniques.

Search for an open source application similar to your application. Look at the source codes and compare your own source codes. Is your source codes equally the same as far as quality is concern? Is there anything you can improve on your codes? If so, can you do it now, or later as you gain more knowledge?

Don't feel content about being able to master procedural programming. Move on to the next level like OOP. The same attitude should be given towards OOP, Move on to the higher level like MVC frameworks and finally move up to HMVC. Attempt to gain solid understanding about MVC patterns, 5 common design patterns in PHP, front controller and dispatcher in PHP. Learn the separation of logics e.g. business and presentation.

As an option, learn twig, TBS, DWOO and Smarty. You will be in good standing as a candidate if you can at least do either Smarty or Twig.

Do not confine yourself in one type of PHP application. Try donwloading wordpress, os commerce, Zen cart, and other …

veedeoo 474 Junior Poster Featured Poster

that is pretty nested. Try using switch statement.You can refactor the $tbl_code==976 to 983 as one query using PHP range function e.g. range(976,983).

range will give you an array. So, it would be nice if you can create a simple function to find out if the $tbl_code is in array to trigger the query.

veedeoo 474 Junior Poster Featured Poster

Do as suggested above and please don't be lazy searching it on google first. Some tutorial may not tell you that you need to enable the EPEL repository to be able to install phpMyAdmin.

You will be needing this, and I highly recommend virtualmin and webmin.

veedeoo 474 Junior Poster Featured Poster

The purpose of my example is to realize the core principle of MVC design Patterns which is no other than the "Separation of Concerns". All PHP MVC and HMVC frameworks follow this core principle.

In a personal level, I have nothing against the author of the tutorial that you are following. However, things that are meant to be confined in the controller and in the model should not be found in the view files.

Codes below are wrong

    <div id="footermainPan">
    <div id="footerPan">
    <?=$this->Mediatutorialmenu->menu_bottom()?>
    <?
    $site_details = $this->Mediatutorialheader->site_details();
    $structure_core = $this->Mediatutorialheader->structure_core();
    //
    $powered = $structure_core['name'].' '.$structure_core['ver'].' build '.$structure_core['build'].' - '.$structure_core['coding'];
    ?>
    <p class="copyright"><?=$this->Mediatutorialheader->copyRight($structure_core['year'])?></p>
    <p class="powered">Powered by <?=$powered?> </p>
    </div>
    </div>

Even if the view carries an instance of the model, there is no way we can pass those data effeciently. Since the model if pretty mal-formed, expect to have an error in teh core/model.

**The reasons?: ** There must be an intance of this model, We want to take advantage of the protection provided by the helpers and libraries and most of these things must be called or instantiated in the Controller.

 Mediatutorialheader

For another chance, please allow me itimized the weakness of the source codes. If we are to follow the basic principles of MVC, then models/mediatutorialheader.php class must be instantiated by the controller/s. It does not matter how many controllers, as long as the data from the model passes the controller, so that the burden of concern on the model ends when any method returns …

veedeoo 474 Junior Poster Featured Poster

you can achieved this by storing the member's status on the database.

for example,

+ user_id + user_name + status  + couple_id +
+---------+-----------+---------+-----------+
+    1    +  husband  + married +    2      +
+---------+-----------+---------+-----------+
+    2    +  wife     + married +    1      +
+---------+-----------+---------+-----------+

So if either one or both are logged in , we can assign their status in session

session_start();

if($_SESSION['logged_in']){

    ## set session for the status, couple_id

   if(!isset($_SESSION['status']) || (empty($_SESSION['status']))){
       $_SESSION['status'] = $row['status'];
       $_SESSION['username'] = $row['username'];
       $_SESSION['couple'] = $row['couple_id'];
   }

   }

use the session as the determinant as to where the user should go..

    if(isset($_SESSION['status']) && isset($_SESSION['username']) && ($_SESSION['logged_in'])){

        ## redirect to a couple page
        ## send a mysql query to retrieve both of the members profile data.

        }

    else{

            ## redirect to a single page
    }

there are so many derivatives in doing what you want and my example is just one of them..

veedeoo 474 Junior Poster Featured Poster

forgot to add this.

normally the default xampp** httpd-vhosts.conf** don't have anything on it and it gives you something like this depending on the version of your xampp.

##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "C:/xamppserver/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>

BUT, that is not going to work because that is for a child directive and we need to add

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

## you add the new virtual hosts here

if you look at the entry in the apache/conf/httpd.conf you will find similar entry

veedeoo 474 Junior Poster Featured Poster

can you show us the apache/extra/httpd-vhosts.conf

The first entry or virtual host should be the duplicate of the main host which is pretty much a shallow one similar to the one recorded on the apache/conf/httpd.conf file

and then followed by the child which is the myweb.local..

for more information about virtualization visit apache. You will have to read this docs sooner or later why not do it today.

veedeoo 474 Junior Poster Featured Poster

I am sure I missed something somewhere in the changes been made in the newer versions of php and apache.

No that's not it.. we can't blame the car manufacturer just because we forgot to put fuel.

I know there are some problems with xampp and windows 7 combination, but your issue is not one of them.

why not make it

127.0.0.1 myweb.local

or something that you like, even with .com.. so that you can access it like http://www/myweb.local .

Here how easy it is..

windows hosts file

 127.0.0.1 myweb.local

xampp's apache/conf/extra/httpd-vhosts.conf

<VirtualHost *:80>
  ServerAdmin webmaster@myweb.local
  DocumentRoot C:\xampp\htdocs\myweb
  ServerName myweb.local
  ServerAlias www.myweb.local  *.myweb.local
  ErrorLog logs/myweb.local-error.log
  CustomLog logs/myweb.local-access.log common

<Directory "C:\xampp\htdocs\myweb">
  Options Indexes Includes
  AllowOverride All
  Require all granted
</Directory>

</VirtualHost>

restart your server and it should work.. try directing your browser to http://www/myweb.local .

When you do this

http://localhost/myweb/

you are not really using the myweb directives from both hosts and vhosts.conf, but rather you are using the directives for the localhost as the document root.

good luck to you.. this is a pretty simple tasks that should have been covered in basic web development courses.. just saying :).

and this one,

RewriteEngine on
RewriteCond %{REQUEST_URI} /(.*).html
RewriteRule (.*) /index.php?include=%1 

it only applies to the directory where it is contained except when it is located in the htdocs directory or above myweb directory. e.g. localhost/myweb/ or when doing localhost/myweb/..

veedeoo 474 Junior Poster Featured Poster

You are doing fine I think. On the other hand, 443 is normally the default Virtual SSL host as defined in httpd-ssl.conf

<VirtualHost _default_:443>

the same port number is use by default in global SSL port to listen to. common in all apache..

#################### Global SSL ##########################
 Listen 443 https

So, if we run this on a page located in the public ssl directory,

if($_SERVER['SERVER_PORT'] !==443){
  echo " We are NOT using SSL";
}

it can provide additional confirmation in checking if using SSL.

if (!isset($_SERVER['HTTPS']) OR empty($_SERVER['HTTPS']) OR ($_SERVER['SERVER_PORT'] !==443)){

     // We are NOT using SSL

}     

that will give us the tertiary check point.

veedeoo 474 Junior Poster Featured Poster

I am just guessing here and I hope someone can look at your code thoroughly

I suspect while loop is running to infinite cycle.

$done = 0;

while($done < 1){
        for($c2 = 0; $c2 < count($open_nodes); $c2++){

        }

  }

It will continue to run who knows until when. While codes below will immediately terminate when $done evaluates to true or assume the value of <1.

$done = 0;

while($done < 1){

    for($c2 = 0; $c2 < count($open_nodes); $c2++){

    }

    $done++;

}

not tested proofs ( just don't have the time actually run it, but I am assuming example below will demonstrate infinite loop.

Example 1 : This will slow down your server, because while loop will never break and will be forced to run over and over again, until the CTRL + C is hit.

$x = 0;

while($x < 1){

    for($y = 1; $y<=3; $y++){

        echo 'Y: '. $y.'<br/>';

    }

    echo '<b>X:</b> '. $x.'<br/>';


}

Example 2: This will terminate or break right away, as soon as $x evaluates to true or have incremented to 1. What is so cool about example 2 is that the output of $y would appear as if it is on top of $x and not inside of it.

$x = 0;

while($x < 1){

    for($y = 1; $y<=3; $y++){

        echo 'Y: '. $y.'<br/>';

    }

    echo '<b>X:</b> '. $x.'<br/>';

    $x++;

}

Example 2 will only loop 3 times while $x is less than 1 .

Y: 1
Y: 2
Y: …
veedeoo 474 Junior Poster Featured Poster

when you do

var_dump($i['popularCities'] );

what do you get?

veedeoo 474 Junior Poster Featured Poster

return the value before the index.

veedeoo 474 Junior Poster Featured Poster

can't you use a pagination for this?

veedeoo 474 Junior Poster Featured Poster

as already been suggested, stay away from using those short tags.

I hate adding more confusion to a broken source codes, so I have decided to write a pretty simple quidelines on the basics of CI. You can either do it like this or follow the tutorials available online.

Before anything else, decide which helpers and libraries will be needed by the controller. If the helpers and libraries are needed throughout the application, then include them in the application/config/autoload.php, else include them in the constructor or inside the method if the requirement of such helpers and libraries is isolated ONLY to such method.

1. Write the controller class

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class Myapp extends CI_Controller 
{

    public function __construct()
    {

        parent::__construct();

    }

    /*
    * I am loading the Myapp_model class in the method 
    * index() and not in the contructor
    */

    public function index()
    {

        /*
        * this load the application/models/Myapp_model.php.
        * once the model class is loaded, it is automatically instantiated and this is the reason I don't want it loaded in the constructor. 
        */

        $this->load->model('Myapp_model');

        ## we prepare the output as an array

        $data['content'] = array($this->Myapp_model->set_index(), $this->Myapp_model->another_content());

        /*
        * this will load the application/views/Myapp_view.php
        * we assign the data array to the view file 
        */
        $this->load->view('Myapp_view', $data);

    }

}

/* End of file Myapp.php */
/* Location: ./application/controllers/Myapp.php */

3.** Create the model class for the controller**

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Myapp_model extends …
mattster commented: Great advice, clearly a lot of effort gone into that +6
veedeoo 474 Junior Poster Featured Poster

not sure if this will help, but there is no harm in sharing.

veedeoo 474 Junior Poster Featured Poster

Hi and welcome to Daniweb Odyssey.

@markjonson that is pretty clever way of posting your spam on Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hello and welcome to Daniweb. I am not sure, but I think you can post on geek's lounge for feedback.

veedeoo 474 Junior Poster Featured Poster

Hello, welcome to Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hello and welcome..

veedeoo 474 Junior Poster Featured Poster

can you try something like this ?

$command = 'put all command here';

shell_exec($command);

if you want it to work in the background, then you can do something like this

shell_exec(" $command > /dev/null ");
veedeoo 474 Junior Poster Featured Poster

run this. Values of the array are the most commonly used in CMS application.

<?php 

 $server_min = array(
                        'max_execution_time' => 1000, 
                        'max_input_time' => 1000, 
                        'upload_max_filesize' => '200M',
                        'post_max_size' => '200M'

                        );


     function get_php_ini_settings($server_min = array())
     {

         $res = '';
foreach($server_min as $setting => $value){
                    $res .= "$setting  : ".ini_get( $setting )."  ";
                    $res .= ini_get( $setting ) < $value ? '(<font color="red">we recommend '.$value.'</font>)': '<font color="red"> OK </font>';
                    $res .= '<br/>';


            }

            $res .= '<font color="red"><b>!Important Notice!</font></b><br/>You can optionally correct the values of the items in red. To do this, you need to make the adjustments in your php.ini file located at. <font color="red"><b>'. php_ini_loaded_file().'</font></b>';
            return $res;
     }


     echo get_php_ini_settings($server_min);

anything that has red font on it, you need to change the value in php.ini. the location has already been given to you by the script.

restart your apache and you should be able to upload upon php.ini file update.

veedeoo 474 Junior Poster Featured Poster

I do understand the familiarity of the client, but it is a backward technology. There is a forum extension for wordpress.

PHP nuke is just like Concrete 5 frozen in PHP 5.3.

If you use Wordpress, you can either create or use readily available bridge for wordpress and phpBB. At least, phpBB is now using symfony2 components.

If the client don't like wordpress, there is drupal with advance forum module. Drupal also uses Symfony2 components. Another lightweight CMS would be Pagekit built using symfony2 components and others.

veedeoo 474 Junior Poster Featured Poster

Hey, Mr. LDA AKA geegler from github welcome to Daniweb. Can you please show us how to develop an application using a PHP router e.g. front controller and dispatcher. I wrote a tutorial on basic MVC, but it is pretty much the same classes that we did long time ago. If it is not too much to ask, it would be nice if you can write an article about the CodeIgniter modularization like the HMVC.

Thanks for accepting my invitation.

veedeoo 474 Junior Poster Featured Poster

Thanks for sharing you codes.

veedeoo 474 Junior Poster Featured Poster

and the new home for codeIgniter is (drumbeat please... and another drumbeat) ...The British Columbia Institute of Technology (BCIT) in Vancouver, Canada.

Please read the official announcement from ellislab here.

IMHO, the decision made by the EllisLab is in the best interest of CodeIgniter. Although, I am not sure how far this framework can evolved in the future, I am standing by on what type of license the BCIT will have on their CodeIgniter release.

I am hoping that BCIT will remove the PHP 4 fallback and focus on the implementation of the PHP 5 standards. This could have been done by many fine coders long time ago, but due to licensing restrictions, no one even bothered to take the first step. The version 2.2.0 was an execllent move, but still the PHP 5 coding standards are partially implemented.

veedeoo 474 Junior Poster Featured Poster

Hmm. If I ran batch script on the client machine to make the information available through a text file, environmental variable, etc., could that work?

that will work on text, xml, tpl, html, phtml, htm files. HOWEVER, there is a big ethical issue here.

The best way to go around with the ethical issues is to notify your clients about this behind the server script. There must be a full disclosures between you and your client. It is not proper to just sneak behind them pulling their files.

Another option is to make it like how the wordpress checks on the version currently installed against the latest release. The idea is very similar, but the version checking is coming from the client machine and not the wordpress website. So, it is actually the website using the same technique outbound to the wordpress distribution site.

By the way, this will be my last response on this thread. I have given you what I thought will work out for you and I cannot write anymore codes that I considered covered by grey area and can define as an act of intrusion .

veedeoo 474 Junior Poster Featured Poster

here is a good test of the function above. Let say, we want to get the modification date of HII_PHP_SuperGlobals_Supersized_Trouble.pdf file

http://www.imperva.com/docs/HII_PHP_SuperGlobals_Supersized_Trouble.pdf

we can simple call our function above like this

$client_file_loc = 'http://www.imperva.com/docs/HII_PHP_SuperGlobals_Supersized_Trouble.pdf';

echo (get_timestamp($client_file_loc));

and the output will be the date the pdf file was modified

2013-09-03 18:41:37

pretty cool huh? :)