1. phpAPP: Include file to help with shell PHP scripting, command-line switch input parsing.

    Date: 12/02/10     Keywords: php

    I've had to re-write this code so many times I finally put it into it's own .inc(lude) file and posted it up online with a demo php application to show off some of the include's abilities so far even in it's limited state. If people could please check it out and give it a try, I'd like to get some feedback on this project as I'd like to make a very robust include file to help myself and others out with shell scripting in PHP.

    Yes, I know shell scripting isn't really done in PHP, but it's a very very powerful language, easily capable of being scripted to become a daemon (bot), or some type of service/server, but the one thing lacking and needed for any command line application is switch input. So here I present phpAPP, the shell scripting helper.

    # ./phpapp -test[]=var0 -test[]=var1 -test[0]="var2 var2" -test2=29.95 --var_display=test2 --arr_display=test
    OUTPUTS:
    Display test2: 29.95
    Display test: Array
    (
        [0] => var2 var2
        [1] => var1
    )

    This is just an example of some of the basic stuff you can accomplish with this.
    http://www.cynagen.com/home.php?page=phpapp -- Latest version will always be available here. Again, please comment.

    Source: http://php-dev.livejournal.com/84422.html

  2. phpAPP: Include file to help with shell PHP scripting, command-line switch input parsing.

    Date: 12/02/10     Keywords: php

    I've had to re-write this code so many times I finally put it into it's own .inc(lude) file and posted it up online with a demo php application to show off some of the include's abilities so far even in it's limited state. If people could please check it out and give it a try, I'd like to get some feedback on this project as I'd like to make a very robust include file to help myself and others out with shell scripting in PHP.

    Yes, I know shell scripting isn't really done in PHP, but it's a very very powerful language, easily capable of being scripted to become a daemon (bot), or some type of service/server, but the one thing lacking and needed for any command line application is switch input. So here I present phpAPP, the shell scripting helper.

    # ./phpapp -test[]=var0 -test[]=var1 -test[0]="var2 var2" -test2=29.95 --var_display=test2 --arr_display=test
    OUTPUTS:
    Display test2: 29.95
    Display test: Array
    (
        [0] => var2 var2
        [1] => var1
    )

    This is just an example of some of the basic stuff you can accomplish with this.
    http://www.cynagen.com/home.php?page=phpapp -- Latest version will always be available here. Again, please comment.

    Source: https://php-dev.livejournal.com/84422.html

  3. XML->PHP resources

    Date: 06/29/10     Keywords: php, xml

    So this one will probably make all the XML experts squirm and itch inside, but i need to ask so my apologies upfront.

    I was wondering if anyone could point me to some online resources where I can learn to manipulate xml data.

    I currently have a .xml document with all the data in that i need, and want to construct php classes and functions to break down the data into relevant variables that i can then display in a php file.

    I can already tell you will all be screaaming "learnit from the start!!!", but I need somewhere that will help me focus on identifying the data needed, accessing the right categiory or sub category for the data, and pulling it out into a variable. Whenever I look at xml stuff, i get frustrated coz it feels liek a familiar code but i'm missing bits of knowledge that stop me from really getting to grips with it :(

    let the flaming begin, lol.

    Source: http://php-dev.livejournal.com/83799.html

  4. XML->PHP resources

    Date: 06/29/10     Keywords: php, xml

    So this one will probably make all the XML experts squirm and itch inside, but i need to ask so my apologies upfront.

    I was wondering if anyone could point me to some online resources where I can learn to manipulate xml data.

    I currently have a .xml document with all the data in that i need, and want to construct php classes and functions to break down the data into relevant variables that i can then display in a php file.

    I can already tell you will all be screaaming "learnit from the start!!!", but I need somewhere that will help me focus on identifying the data needed, accessing the right categiory or sub category for the data, and pulling it out into a variable. Whenever I look at xml stuff, i get frustrated coz it feels liek a familiar code but i'm missing bits of knowledge that stop me from really getting to grips with it :(

    let the flaming begin, lol.

    Source: https://php-dev.livejournal.com/83799.html

  5. Startup is looking for developers (Moscow, Russia)

    Date: 04/14/10     Keywords: no keywords

    Hi there!
    Hope developers from Russia are reading this community, cause we're looking for great professionals in Moscow. Even got special prizes for them. We're the team of Russian startup tournament called Harvest@GreenfieldProject. It'll be held on 17th-18th of April in Moscow. So if you're from Russia, pls read the text below and join our event!

    Разработчики – самые дефицитные специалисты в стартапах. Поэтому на новом Harvest (РИФ+КИБ edition) мы создали вам особые условия.

    Harvest (РИФ+КИБ edition) – стартап-турнир, на котором за 2 дня можно успеть то, что не получалось доделать месяцами. Победившая команда получит полностью оплаченную поездку на учёбу в летней бизнес-школе Ignite в Кембридже (Англия).

    17-18 апреля пройдёт отборочный турнир для стартапов любой степени готовности: от задумки, презентуемой впервые, до развитого проекта, которому не хватает рук. Как советует Ричард Брэнсон «К черту все! Берись и делай!»

    Участники выберут лучшие идеи, представленные в формате elevator-питчей, разобьются на команды и при поддержке экспертов проработают концепцию и бизнес-модель, создадут прототип и инвестиционный тизер.

    Выходные – лучшее время, чтобы поработать над проектом собственного бизнеса. Или найти проект, к которому захочется присоединиться. Harvest – это площадка, на которой можно “и себя показать, и других посмотреть”: найти единомышленников, бизнес-партнёров, обменяться контактами с будущими заказчиками или потенциальным боссом.

    Финалиста определят 23 апреля на Объединенной конференции РИФ+КИБ 2010. Чтобы пройти в финал, нужно сделать summary готового проекта на английском. А затем пройти телефонное интервью с представителем Кембриджского университета. Знание языка очень пригодится.

    Второй приз — участие в любой образовательной программе Start in Garage на ваш выбор.

    Подробная информация и регистрация участников на сайте стартап-турнира: http://harvest.greenfield-project.ru/
    Цена участия для разработчика составит всего 600 р. Снизить её еще на 20% можно, оплатив через интернет.

    Тем, кто зарегистрировался, достаточно приехать 17 апреля с ноутбуком, знаниями и опытом в МФПА на “Семёновской” (100 м. от метро). Остальное – интернет, питание, аудитории и интересных экспертов – обеспечит команда организаторов.

    Source: http://php-dev.livejournal.com/83334.html

  6. Startup is looking for developers (Moscow, Russia)

    Date: 04/14/10     Keywords: no keywords

    Hi there!
    Hope developers from Russia are reading this community, cause we're looking for great professionals in Moscow. Even got special prizes for them. We're the team of Russian startup tournament called Harvest@GreenfieldProject. It'll be held on 17th-18th of April in Moscow. So if you're from Russia, pls read the text below and join our event!

    Разработчики – самые дефицитные специалисты в стартапах. Поэтому на новом Harvest (РИФ+КИБ edition) мы создали вам особые условия.

    Harvest (РИФ+КИБ edition) – стартап-турнир, на котором за 2 дня можно успеть то, что не получалось доделать месяцами. Победившая команда получит полностью оплаченную поездку на учёбу в летней бизнес-школе Ignite в Кембридже (Англия).

    17-18 апреля пройдёт отборочный турнир для стартапов любой степени готовности: от задумки, презентуемой впервые, до развитого проекта, которому не хватает рук. Как советует Ричард Брэнсон «К черту все! Берись и делай!»

    Участники выберут лучшие идеи, представленные в формате elevator-питчей, разобьются на команды и при поддержке экспертов проработают концепцию и бизнес-модель, создадут прототип и инвестиционный тизер.

    Выходные – лучшее время, чтобы поработать над проектом собственного бизнеса. Или найти проект, к которому захочется присоединиться. Harvest – это площадка, на которой можно “и себя показать, и других посмотреть”: найти единомышленников, бизнес-партнёров, обменяться контактами с будущими заказчиками или потенциальным боссом.

    Финалиста определят 23 апреля на Объединенной конференции РИФ+КИБ 2010. Чтобы пройти в финал, нужно сделать summary готового проекта на английском. А затем пройти телефонное интервью с представителем Кембриджского университета. Знание языка очень пригодится.

    Второй приз — участие в любой образовательной программе Start in Garage на ваш выбор.

    Подробная информация и регистрация участников на сайте стартап-турнира: http://harvest.greenfield-project.ru/
    Цена участия для разработчика составит всего 600 р. Снизить её еще на 20% можно, оплатив через интернет.

    Тем, кто зарегистрировался, достаточно приехать 17 апреля с ноутбуком, знаниями и опытом в МФПА на “Семёновской” (100 м. от метро). Остальное – интернет, питание, аудитории и интересных экспертов – обеспечит команда организаторов.

    Source: https://php-dev.livejournal.com/83334.html

  7. simple PHP code for retrieving text from another .php file

    Date: 03/26/10     Keywords: php, database, web

    Hi I need a little help with this. I'm looking for a simple PHP script that i used to have and now im having difficulty finding it. All the script does it retrieve the data from another webpage created on your server, so when you click the link (/index.php?page=contact) and the page reloads, the page will have that data in the content area of your index template.

    I don't remember this code ever needed a database.
    Can anyone help?

    Source: http://php-dev.livejournal.com/83094.html

  8. simple PHP code for retrieving text from another .php file

    Date: 03/26/10     Keywords: php, database, web

    Hi I need a little help with this. I'm looking for a simple PHP script that i used to have and now im having difficulty finding it. All the script does it retrieve the data from another webpage created on your server, so when you click the link (/index.php?page=contact) and the page reloads, the page will have that data in the content area of your index template.

    I don't remember this code ever needed a database.
    Can anyone help?

    Source: https://php-dev.livejournal.com/83094.html

  9. getting reference to array value changes structure of array?

    Date: 02/12/10     Keywords: database

    I'm surprised to see the var_dumps aren't identical. Is there any reason in practice to worry about the difference between them? Also, in general, is code like following frowned upon? I'm building up a data structure through reading rows from a database -- an array of arrays.

    array('C'=>'C')));
    has output
    array(1) {
      ["B"]=>
      &array(1) {
        ["C"]=>
        string(1) "C"
      }
    }
    array(1) {
      ["B"]=>
      array(1) {
        ["C"]=>
        string(1) "C"
      }
    }

    Source: http://php-dev.livejournal.com/82911.html

  10. getting reference to array value changes structure of array?

    Date: 02/12/10     Keywords: database

    I'm surprised to see the var_dumps aren't identical. Is there any reason in practice to worry about the difference between them? Also, in general, is code like following frowned upon? I'm building up a data structure through reading rows from a database -- an array of arrays.

    array('C'=>'C')));
    has output
    array(1) {
      ["B"]=>
      &array(1) {
        ["C"]=>
        string(1) "C"
      }
    }
    array(1) {
      ["B"]=>
      array(1) {
        ["C"]=>
        string(1) "C"
      }
    }

    Source: https://php-dev.livejournal.com/82911.html

  11. paypal express checkout

    Date: 08/16/09     Keywords: database, shopping

    Does anyone have any experience of installing paypal express on a custom built shopping cart? i'm getting absolutely nowhere and and starting to lose the will to live :( Is there any kind sole willing to have a look at the code for me? maybe even correct it, test it, make it work? for a little bit of cash? None of the online tutorials i've found make any sense :/

    I've got a business account set up and have the API details, and i have a sandbox account with API details. The express button is on the checkout page and takes me to paypal sandbox. but it doesn't seem to be taking the order details through with it. I also need the site to update the database to say payment has been received and the order should be shipped to the paypal address.

    Anyone feeling helpful and kind? :) pretty please? I need this doing as sooon as possible.

    [x-posted a little]

    Source: http://php-dev.livejournal.com/82433.html

  12. paypal express checkout

    Date: 08/16/09     Keywords: database, shopping

    Does anyone have any experience of installing paypal express on a custom built shopping cart? i'm getting absolutely nowhere and and starting to lose the will to live :( Is there any kind sole willing to have a look at the code for me? maybe even correct it, test it, make it work? for a little bit of cash? None of the online tutorials i've found make any sense :/

    I've got a business account set up and have the API details, and i have a sandbox account with API details. The express button is on the checkout page and takes me to paypal sandbox. but it doesn't seem to be taking the order details through with it. I also need the site to update the database to say payment has been received and the order should be shipped to the paypal address.

    Anyone feeling helpful and kind? :) pretty please? I need this doing as sooon as possible.

    [x-posted a little]

    Source: https://php-dev.livejournal.com/82433.html

  13. explode help needed

    Date: 04/21/09     Keywords: php

    [solved, thanks to darac]

    Me again! And i may be back for more help later too! hehe

    Anyways, i need some help with the explode function in php.

    If i have an Array of words, how do i display that array and have commas inbetween each word?

    From:

    Array (
         [0] => one     
         [1] => two     
         [2] => three
         [3] => four five six
     ) 


    How do i get it to display onscreen as:
    one, two, three, four five six

    The important thing is to *not* have a comma at the very end.

    thanks in advance! :)

    Paul

    Source: http://php-dev.livejournal.com/81929.html

  14. explode help needed

    Date: 04/21/09     Keywords: php

    [solved, thanks to darac]

    Me again! And i may be back for more help later too! hehe

    Anyways, i need some help with the explode function in php.

    If i have an Array of words, how do i display that array and have commas inbetween each word?

    From:

    Array (
         [0] => one     
         [1] => two     
         [2] => three
         [3] => four five six
     ) 


    How do i get it to display onscreen as:
    one, two, three, four five six

    The important thing is to *not* have a comma at the very end.

    thanks in advance! :)

    Paul

    Source: https://php-dev.livejournal.com/81929.html

  15. Prev/Next item with MySQL

    Date: 04/19/09     Keywords: php, mysql, database, sql

    [solved, thanks to synergetic]

    HiGuys,

    Needing a bit of help with MySQL queries. Hopefully someone has the answer, or a pointer at least :)

    Say I have a page displaying an item, www.domain.com/item.php?id=12 and at the bottom of that page i want to have a Previous link and a Next link which will link to the previous and next item in the database, how do i call the item numbers? I don't want to just do $id - 1 or +1 becausethe next item might be number 14 for example, not 13.

    So before the links are displayed, i need some way of saying the id is 12, look at what the next number is in the id column and select that one. So it's not just a prev/next page link, but prev/next item in the DB link.

    Hopefully my laymans terms aren't too confusing!

    Any ideas? :)

    many thanks,

    Paul

    Source: http://php-dev.livejournal.com/81861.html

  16. Prev/Next item with MySQL

    Date: 04/19/09     Keywords: php, mysql, database, sql

    [solved, thanks to synergetic]

    HiGuys,

    Needing a bit of help with MySQL queries. Hopefully someone has the answer, or a pointer at least :)

    Say I have a page displaying an item, www.domain.com/item.php?id=12 and at the bottom of that page i want to have a Previous link and a Next link which will link to the previous and next item in the database, how do i call the item numbers? I don't want to just do $id - 1 or +1 becausethe next item might be number 14 for example, not 13.

    So before the links are displayed, i need some way of saying the id is 12, look at what the next number is in the id column and select that one. So it's not just a prev/next page link, but prev/next item in the DB link.

    Hopefully my laymans terms aren't too confusing!

    Any ideas? :)

    many thanks,

    Paul

    Source: https://php-dev.livejournal.com/81861.html

  17. php driven image gallery - help needed

    Date: 03/10/09     Keywords: php, mysql, database, sql, web

    (x-posted to '[info]'php)

    Hey guys,

    I'm coding an image gallery to use on my PHP site and need a bit of help with a couple of features I want to code into it. I was hoping someone here could either give me some pointers or send me to a website that will help with either explainations or code snippets :)

    1. Firstly, thumbnails. I have created an admin panel where I upload the images and can set various things like the category, title etc, and all that is stored in a MySql database, and the file uploaded to a general directory. But i'd also like to create a thumbnail of the image as it uploads. I've found several scripts that make thumbnails from images already in a directory, but i'd like it to happen as I upload the image. Is that possible? Without having to use some all-in-one image gallery script heh. I'd also need it to resize the image proportionally so that images aren't just squashed into a 100x100 square shape.

    2. Secondly, I'd like to "tag" images like with LJ entries, so that on the front end when a picture is being viewed, the list of tags is shown and can be clicked on to show other image thumbnails with the same tag. But i'm not really sure how to go about this... I was just going to have a table field called img_tags and store them all in that per image, but then is that efficient? searching for matches within a db field? any tips or suggestions?

    3. oh and as an extra thought, how can i then take those tags and make a tag cloud maybe?

    All and any help would be most appreciated! :)

    paul
    x

    Source: http://community.livejournal.com/php_dev/81475.html

  18. php driven image gallery - help needed

    Date: 03/10/09     Keywords: php, mysql, database, sql, web

    [solved, thanks to thenetimp]

    (x-posted to php)

    Hey guys,

    I'm coding an image gallery to use on my PHP site and need a bit of help with a couple of features I want to code into it. I was hoping someone here could either give me some pointers or send me to a website that will help with either explainations or code snippets :)

    1. Firstly, thumbnails. I have created an admin panel where I upload the images and can set various things like the category, title etc, and all that is stored in a MySql database, and the file uploaded to a general directory. But i'd also like to create a thumbnail of the image as it uploads. I've found several scripts that make thumbnails from images already in a directory, but i'd like it to happen as I upload the image. Is that possible? Without having to use some all-in-one image gallery script heh. I'd also need it to resize the image proportionally so that images aren't just squashed into a 100x100 square shape.

    2. Secondly, I'd like to "tag" images like with LJ entries, so that on the front end when a picture is being viewed, the list of tags is shown and can be clicked on to show other image thumbnails with the same tag. But i'm not really sure how to go about this... I was just going to have a table field called img_tags and store them all in that per image, but then is that efficient? searching for matches within a db field? any tips or suggestions?

    3. oh and as an extra thought, how can i then take those tags and make a tag cloud maybe?

    All and any help would be most appreciated! :)

    paul
    x

    Source: http://php-dev.livejournal.com/81475.html

  19. php driven image gallery - help needed

    Date: 03/10/09     Keywords: php, mysql, database, sql, web

    [solved, thanks to thenetimp]

    (x-posted to php)

    Hey guys,

    I'm coding an image gallery to use on my PHP site and need a bit of help with a couple of features I want to code into it. I was hoping someone here could either give me some pointers or send me to a website that will help with either explainations or code snippets :)

    1. Firstly, thumbnails. I have created an admin panel where I upload the images and can set various things like the category, title etc, and all that is stored in a MySql database, and the file uploaded to a general directory. But i'd also like to create a thumbnail of the image as it uploads. I've found several scripts that make thumbnails from images already in a directory, but i'd like it to happen as I upload the image. Is that possible? Without having to use some all-in-one image gallery script heh. I'd also need it to resize the image proportionally so that images aren't just squashed into a 100x100 square shape.

    2. Secondly, I'd like to "tag" images like with LJ entries, so that on the front end when a picture is being viewed, the list of tags is shown and can be clicked on to show other image thumbnails with the same tag. But i'm not really sure how to go about this... I was just going to have a table field called img_tags and store them all in that per image, but then is that efficient? searching for matches within a db field? any tips or suggestions?

    3. oh and as an extra thought, how can i then take those tags and make a tag cloud maybe?

    All and any help would be most appreciated! :)

    paul
    x

    Source: https://php-dev.livejournal.com/81475.html

  20. accessing an object like an array

    Date: 02/20/09     Keywords: no keywords

    I am hoping someone can point me in the right direction.

    I have an object that at some point sets one of it's variables as an array.

    
    class myClass
    {
      private $data = array()
    
      public function __construct($newData=array())
      {
        $this->setData($newData);
      }
    
      public function getData()
      {
        return $this->data;
      }
    
      public function setData($newData=array())
      {
        $this->data = $newData;
      }
    }
    
    $dataObj = new myClass($someDataArray);
    
    // I want to be able to do.
    
    print $dataObh['myArrayKey']
    
    // and get back the data that that key holds in the object $data variable
    
    
    


    I know it can be done, I just don't know the specifics, and I think it has something to do with Obect Iteration, but the docs are confusing me. Thanks.

    Source: http://community.livejournal.com/php_dev/81372.html

  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home