Jump to content

Bman900

Members
  • Posts

    184
  • Joined

  • Last visited

    Never

Posts posted by Bman900

  1. Alright I went with the XML route and found a bank that does this and I got it to read partially.

     

    <Rate currency="AED">1.0338</Rate>  I can not get the rate out from between the brackets. Here is the code am using:

     

    <?php
    
        $XML=simplexml_load_file("http://www.bnr.ro/files/xml/curs_2012_8_3.xml");
    
                
        foreach($XML->Body->Cube->Rate as $rate){
            //Output the value of 1EUR for a currency code
            echo '1 LEI ='.$rate["rate"].' '.$rate["currency"].'<br/>';
            //--------------------------------------------------
            //Here you can add your code for inserting
            //$rate["rate"] and $rate["currency"] into your database
            //--------------------------------------------------
        }
    ?>

     

    I will only print the AED part.

  2. In my site I would need to display currency rates, I am thinking of getting such info from an official page but can I do this automatically somehow with PHP? Meaning the info is somewhere on the page and I want to somehow grab that little piece of information.

     

    I was thinking maybe I need a spider, and if so can any one point me to a good tutorial to get started?

  3. I am looking for a simple way of displaying images from a folder, and then when u click on it, the full version will pop up. I have never really delved into java script so if there are any gurus in here that would help me out, I would sure appreciate it.

  4. Well after a month or so of hard work I finaly launched my new site called Funny Kiwi. Its a site where users can post funny pictures or youtube videos. I have implemented features such as: rating, user profiles along with avatars and changing username color, indexed search, comment posting, facebook sharing and some more. So I leave you with a link and ask for any feedback here. http://funnykiwi.com

     

    funnykiwicomscreencapture2011-11-25-17-22-50.png

     

    funnykiwicomscreencapture2011-11-25-17-27-21.png

     

    funnykiwicomscreencapture2011-11-25-17-28-24.png

  5. Basically I need to select some rows from my database that have been posted in the last 24 hours. So since my date is stored from the values of the time() function I want to do a query to get the results only greater than a certain time code.

     

    So if I lets say have this value: 1321184384, what can I subtract to go back 24 hours?

  6. So I ran into the most bizarre problem ever on my live server. For some odd reason something, somewhere is adding an extra character after every " mark I have. Now I am using zend framework but this can not be an issue involving them since everything works perfectly on my localhost. I am using 1and1 to host my application but for the love of me I can not narrow this down any more.

     

    Ex of my problem, I type this into my text box: "This is a sentence" and it proceeds to saving this: \"This is a sentence\" 

     

    Something is happening right after I submit my form because if I add the code directly in my database, it displays everything fine. Has any one ever ran into this problem before?

  7. I ask this because my site runs on 3 languages and the main content is loaded from the database in a language depending on what cookie is set. Now I have also made it so that language can be set in the url such as site.com/lang/en The only concern I have is how will google know to crawl my site in all 3 languages?

  8. Well I got mad and decided not to give up. So far I actualy got a way of indexing newly added articled but the trouble comes in when I need to update them. I understand I have to delete the document and re ad it. Am fine with the re adding but the deletion deletes everything!

     

    $index = Zend_Search_Lucene::open('index');
    
    
    		$removePath = 'article/view/' . $id;
    		$hits = $index->find('url:' . $removePath);
    		foreach ($hits as $hit) {
        		$index->delete($hit->id);
    		$index->commit();

     

    Any ideas why its deleting everything in the index and rather no the documents that match my remove path?

  9. Wow thank you for the info. It seems easy in theory but getting down to it is impossible for some one who is new to the framework. I have tried creating the spider in your link but for some reason it keeps giving me errors with the include files. Till I finaly get the hang of this framework more, is there another way of creating a search of my site with Zend?

  10. I understand that to search my site I have to use zend_search_lucene but I can not find anything anywhere that explains it in a simple language. For example indexing pages, where is it done? From the controller of each model I want indexed?

  11. Well I had a WAMP package installed on my Vista 64bit PC and then my motherboard burned out so now am on my laptop.  I just tried installing the newest WAMP server on the laptop which happens to be a Vista 64bit as well but for some strange reason it doesn't work like on my PC. So my question is what other packages are out there for windows for such services so I can run web applications on my PC?

×
×
  • 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.