Jump to content

ankur0101

Members
  • Posts

    242
  • Joined

  • Last visited

Posts posted by ankur0101

  1. If you are a beginner, IMPO, one should learn Codeigniter and CakePHP. After that you can develop some projects on FuelPHP which uses composer.

    At the final, put your hands on Laravel 4 which is a mothership of Fuel.

     

    Now many people will say CI is dead, I said that actually clears the idea of MVC because they got the best documentation. It is very simple to use. But ellislab.com has stopped its support for CI.

    I heard CakePHP is pretty much similar to CI but I haven't yet used it in my projects. I am using FuelPHP and Laravel 4 on my current projects.

    Both of them are mostly same but L4 got big community support compared to Fuel.

    From community support point of view, I think CI comes with best forum support, still people out there are active.

    About Fuel, there is not so much noise on their forums. And talking about L4, yes there is a noise but more of that comes from people looking for solutions to problems. Most of the threads on L4 forum have not yet replied from many months.

  2. When ElliseLab left CI, its users started feeling as they are orphans. But its time for adoption.

    I used CI on more than 12 project. So after CI, which MVC is good ? I have shortlisted following frameworks :

     

    FuelPHP

    =========

    Nicely documented.

     

    Laravel

    =========

    Still new and makes it very difficult to run on cPanel based shared hosting.

    Confusing when coming through Codeigniter. Not so well documented.

     

    CakePHP

    =========

    Nicely documented, very easy to learn after working on Codeigniter

     

    Symfony

    =========

    Documentation is not so good. Little bit confusing.

     

    Zend

    ========

    Takes lot of time to learn. Lots n lots of classes and libraries.

     

    Yii

    ========

    Never used.

     

    It is said that Codeigniter is the fastest MVC framework compared to any of them. On many forums, people are saying Laravel is good but I didnt see exact points why Laravel is good.

     

     

    Please suggest me a framework which have very good community and forum support, good performance and pretty stable enough.

    Personally I am thinking about Laravel or FuelPHP

     

    Thanks

  3. Hi,

    Is there any way to find how many arguments are DEFINED in a function ?

    Means is there any way to show that there are 2  arguments defined in myFunc ?

     

    So after writing func_num_args() and comparing it with 2 is there any way to automatically detect how many attributes are defined ?

     

    Thanks

  4. Hi,

    I think subject tells you everything about question. Suppose I have following code >

    <?php
    
    class Car
    {
    
          public function drive($driver='', $car_model='')
          {
                echo "Wrooom !!!";
          }
    
    }
    
    $car = new Car;
    $car->drive('Matt', 'BMW');
    
    ?>
    

    SO what I want to do is if developer types $car->drive('Matt', 'BMW', 'randomstring')

    It should throw error.

    Means the method/function drive() should contain only 2 attributes, if 3rd attribute value is passed, it should throw error.

     

    How to do that ?

     

    Thanks

  5. Hi,

    I am really bad when it comes to Regex. Every time, when I need to do things with it, I get confuse.

    I want to find a word called hello in a variable. something like,

    $word = "hello";
    
    $target = "hello_guys_howz_life";
    

    Using preg_match, how can I check whether hello word exist in variable $target ?

     

    Thanks

  6. Hey,

    Even I am also using Mandrill on one of my project. Just add a domain or email address, verify it and obtain SMTP details.

    I think once SMTP details are received, you can carry on rest of things.

     

    Another way is to get their php sdk library and use it in your code.

  7. According to what your are writing, it doesnt seem you are a tech guy and you are completely newbie in servers and hosting industry.

    I think its bad idea to run XAMPP for production env. If you are setting up server env, you will be responsible for any downtimes, hardware bail outs, software updates, backups etc.

    Better to host with hosting company or google for php paas.

  8.  

    You could use a combination of IP address and user agent (you don't need javascript for this), i.e.

     

    access_logs

    id ip_address user_agent created_at

    I was thinking about the same. Practically we cannot detect unique visitor.

    There might be a case where 2 users are under same IP, using same browser and user_agent will show same text. So in that case, I thought of detecting user's screen resolution.

    I know again there is a possibility of 2 guys using same IP, same user_agent and same size of monitors.

  9. Hi,

    I am using jquery $.post() to get content from other URL. A reason behind that is it sends XMLHttpReqtest using which I can restrict users directly visiting the remote URL.

    Lets see an example of code which I am using

    <script>
    $(document).ready(function(){
    $('#click').on('click', function(){
    $.post("http://localhost/my_hiden_url.php/", function(data) {
                    $('#content').html(data);
                    });
    });
    });
    </script>
    
    <button name='click' id='click'>Click</button>
    <p id='content'></p>

    So when I click the button called Click, it will call for URL http://localhost/my_hiden_url.php and put its returning content data as html into place where id='content' is mentioned.

     

    But many times when remote URL http://localhost/my_hiden_url.php takes lot of time because if fetches lot of data from database, till that time id='content' does not show anything and as soon as it receives some data from my_hidden_url.php, it pastes on <p> as it is.

     

    My question is in case of more time when http://localhost/my_hiden_url.php is working with database, how can I put an image of text as "Loading . . ." in place of id='content' ?

     

    So it should be like when I click Click button, it will show Loading image or text till it receives any data from my_hiden_url.php.

     

    How to do that ?

  10.  

     

    I assume you're sending text messages, are you sure restrictions on IP addresses are the best way to go? You may be better off restricting on a per-user basis, as multiple users could use the same computer.
     IPs may be shared by many people and it will change if you go from your house to Starbucks.

    You got a point. We can restrict on IP and visitor's Web Browser.

    I am going to provide specific service which registered users can use n number of times but free users can use only 10 times then they would have to wait for 30 minutes. After than they can again use for 10 times and again wait.

     

    Using java scripts, we can gather users' OS, Screen resolution. This is not going to be exact way to differentiate users sitting on same IP.

    What are other options ?

  11. Hi,

    Suppose I have a form where I am accepting mobile number from users and showing such as

    show.php?m=9999999999

     

    Now what I want is that any person / visitor can submit form or go to above URL with different numbers only 10 times, after that he will get error message stating Visitors maximum quota reached.

    And I want to restrict any queries from that IP for next 6 hours.

     

    I am confused, how to do that ?

  12.  

     

    But really, what do you want to use Linux for? If its just for lamp development, just install Vagrant onto your Windows machine and run up a VM whenever you need it. that way you can use whatever distro you need for the job at hand.

    I want t just for fun. When I will tired of Windows, I will use linux. But should be stable.

    And I am using xampp on windows.

  13. Hi,

    I am running Windows 7 on my Lenovo S400. I am also a fan of Linux. I want to install install side by side with Win 7.

    Purpose ? Nothing special, as simple as most of us, like surfing, watching movies, listening songs and off-course for LAMP.

    I am confused which distro to choose. Following are my needs :

     

    Stability :

    I want super cool stability. Means it should not create any problems after installation. It should run smoothly.

     

    Performance :

    Its all about Speed. Ubuntu 13.10 gives less performance than earlier versions of Ubuntu 9.10

    Ubuntu 13.10 comes which graphic effects and new right side scrolling menu which is totally waste for me. I still prefer traditional top menu of Linux which give very good performance.

    I dont want flashy things, just simple desktop

     

    Support :

    Like Ubuntu LTS gives long time support. Somewhere I read Fedora just give repo support till 12 months, after we need to upgrade to next version.

     

    Following distros comes in my mind :

    Ubuntu 12.04 LTS

    Fedora 19

    CentOS

    Linux Mint

    Puppy Linux

     

    From them I have not yet used Linux Mint and Puppy Linux.

    I have used nearly all versions of Ubuntu. I dont like their latest releases (Ubuntu 10.04 and further). Most of them are freaking buggy.

    It just makes me angry because instead of ENJOYING linux, I have to google for bug sulutions. I give a big thumb down of my both hands.

     

    Just downloaded Fedora 19 and tested livecd. Desktop is really nice very clean. No shiny and sparkling things which I like. (Because I think Linux is best for its performance and if it is lacking for that, it is a waste for ME.)

     

    CentOS suits for server environment such as cpanel hosting. But it is very stable. Give very good performance.

     

    On lot of forums, people were writing Linux Mint is best but I dont know why. So if you have used Mint, please give your opinion. (I never used it)

     

    Puppy Linux - Never used.

     

    Among them, I like Fedora 19 but before making any decision, I would like to know more about Mint and Puppy.

     

    Thanks

  14. You can't judge a book by its cover.

    I did't say that I dont like Laravel because of its website design.

    I was talking about their website designs, look and feel.

     

     

     

    There is not much I like about Fuel as a framework.

    I would like to know why PHP experts are giving thumb up to Laravel than any other framework. All people are talking about how good is laravel on many forums but none of the gave exact reason.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.