logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Describe how to create a simple AD rotator script without using database in PHP.


  • Correct Answer
  • Following are the steps to create a simple AD rotator script without using database in PHP: - All the ad?s can be collected in one place and be displayed randomlyrand() function can be used for this purpose - In order to NOT use any database, a flat file can be used to store the ad?s - In order to store the Ad?s information (HTML code), a flat file say ?adtxt? can be created - The random number can be stored in a variable $result_random=rand(1, 100); - Conditions can be checked to display the ad?s if($result_random<=70) { echo "Display ad1"; } 


  • Technology problems


    Search Results


    • 1. How to use HTTP Headers inside PHP? Write the statement through which it can be added?
    • Discuss
    • 2. How can I retrieve values from one database server and store them in other database server using PHP?
    • Discuss
    • 3. Will comparison of string "10" and integer 11 work in PHP?
    • Discuss
    • 4. With a heredoc syntax, do I get variable substitution inside the heredoc contents?
    • Discuss
    • 5. Difference between ActiveX Exe and Dll ?
    • Discuss
    • 6. What is the difference between the functions unlink and unset in PHP?
    • Discuss
    • 7. What is the difference between _construct() and _destruct() methods in php?
    • Discuss
    • 8. What's the difference between GET() and POST() method?
    • Discuss
    • 9. What is the purpose $_PHP_SELF variable?
    • Discuss
    • 10. What's the difference between Session and Cookie?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment