1. This forum is in read-only mode.

Oh great... another one...

Discussion in 'Introductions' started by Deathseeker, Dec 2, 2008.

Thread Status:
Not open for further replies.
  1. Deathseeker

    Deathseeker Member

    Hello there,

    My username is Deathseeker, I am a Web designer, Firefox lover and Pokemon fanatic

    Well not so much Fanatic anymore but I do still head a Pokemon Website and Community.

    I joined Romulation after downloading a number of roms from your website and quickly finding out that this site was the best rom site in terms of selection and ease of use.

    Now that I've done my formal talking, I hope to have fun at these forums and learn more about how things are done here. (I also noticed the site is very well coded with php and I'd like to learn more about it ::) )

    And I know what you're all thinking about me when you visit this topic, and I'm hoping to be more then just another member who joined just for the downloads :p

    ~Death
     
  2. Loonylion

    Loonylion Administrator Staff Member

    there's not really much to know about RomUlation in terms of code, it's developed entirely in-house using a custom built framework, which was also developed in-house.
     
  3. Deathseeker

    Deathseeker Member

    Yeah I can tell (the custom built framework part btw),

    But there's always something new to learn out there, I'm a total novice when it comes to php though, I only know a few varied codes that I use to enhance my html and a bit of it's structure, so php is something I really want to learn seeing as I'm making professional websites as it is...

    ~Death
     
  4. marcy

    marcy Guest

    Welcome to RomUlation! :)

    More and more programmers joining the site.


    If you want to learn php, this site will help you:
    http://www.php.net/manual/en/index.php



    Don't worry learning php is easy.
    I guess it took me 3 days to learn it.


    let me grant you this code:
    Code:
    <html>
    <head>
    </head>
    <body>
    <form method="post">
    <input name="input" value="<?php if(isset($_POST['input'])) echo $_POST['input'] ?>">
    <input type="submit" value="Search">
    </form>
    <?php
      function search_function($expr)
      {
        $funcs=get_defined_functions();
    
        $funcs=array_merge($funcs['internal'],$funcs['user']);
        $results=array();
        foreach($funcs as $func)
          if(eregi($expr,$func))
            array_push($results,$func);
        
        sort($results);
    
        return $results;
      }
      
      if(isset($_POST['input']))
      {
        $input=$_POST['input'];
        if($input!='')
        {
          $array=search_function($input);
    
          $out=implode("
    \n",$array);
          echo $out;
        }
      }
    ?>
    </body>
    </html>
    
    it helps finding functions
     
  5. apophos755

    apophos755 Well-Known Member

    Welcome to RomUlation. I hope you like it here.
     
  6. zinectics

    zinectics Well-Known Member

    welcome to RomU Deathseeker

    hope you have a good stay here at the forums ^^
     
  7. Cahos Rahne Veloza

    Cahos Rahne Veloza The Fart Awakens

    Don't worry Deathseeker, almost everyone here who's active started out just for the games, but circumstances made them pop in to see what the hubbub is with the forum & soon they realize how friendly & helpful everyone here, by then they can't get enough out of the stuff that's happening here :D
     
  8. Deathseeker

    Deathseeker Member

    lol Thanks Cahos, and thanks for the welcome everybody and thank you veeeeeeeeeery much Marcy, I cherish that code with my life :D

    ~Death
     
  9. Seph

    Seph Administrator Staff Member

    Well, just for the record, that piece of code is a bit... um, well I wouldn't use it. :p

    First of all, get_defined_functions is just horrible since you'll want to always know what info is where, get_defined_functions does not discriminate there. Then the use of eregi is questionable, while the expression is provided through a parameter chances are you can do with a normal string comparisons or a preg_match, which is faster.

    Lastly, why would you even want to find functions like that? You've got a great lookup at php.net and a downloadable manual, I really don't see what this function does that's useful.
     
  10. Deathseeker

    Deathseeker Member

    I was being slightly sarcastic about that code btw :p and I personally think that the manual is great, I'll be looking at that manual veeeeery often :D

    Thanks for the info Seph :)

    ~Death
     
  11. ricky92

    ricky92 Member

    Hello Deathseeker,Welcome to Romulation.Its good to see more members ;D
     
  12. marcy

    marcy Guest

    Lord Seph hates my code.  :'(

    I don't mind. :D


    First things first:
    I have programmed that thing above in approx. 15 min., because I was in a rush,
    so I know it's far from being perfect (and very far from being pretty, haha :D)

    -------------------------------------------------------------------------------------------------------

    Since I'm partially working with 4 different php-versions and 2 different OS, I decided to program something that shows the functions that are defined, right now.
    I didn't want to know all the functions, so I added some string matching to filter them.
    Because I was pretty sure I want to search a bit more advanced way, I used regular exprssions.
    I used POSIX, because I'm using it very often, lately and
    I used eregi(), because I want to find the function, even if I am too stupid to type in lower cases.

    -------------------------------------------------------------------------------------------------------

    It's very useful for me

    For example:
    If I want to know what functions my current php-version got for manipulating images.


      I could use php.net, look at every image related function and look if that function is defined with my current OS, with my current php-version.

          or

      I first could use my own function that shows me what functions, including the word image, I currently have and after that I could use php.net to inform myself about them.

    -------------------------------------------------------------------------------------------------------

    Of course, my function is just something additional.
    The main thing to use is always php.net.


    You're saying PCRE-functions are faster than POSIX-functions ??  hmm... I'll give it a try. ;D

    Edit:
    OK, tried it.

    PCRE-functions are usually faster for finding matches.
    But, POSIX-functions are faster for finding not matching things.
     
  13. Renji217

    Renji217 Well-Known Member

    Hi and welcome to RomU!! I hope to see you alot in the forums!!
     
Thread Status:
Not open for further replies.