Auto down counter

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by bigjoe4, Apr 26, 2008.

  1. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    I found out x10 does allow you to use .htaccess, I know how to edit it, bad news is I can't get that html extention to work...

    How to edit your htaccess file:
    go to your file manager
    edit it.

    How to see that file:
    if you can't see it, go to your cp and scroll down
    click "reset all interface settings"
    click file manager
    click "show hidden files"
    click ok
     
  2. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    actually don't worry I assume you mean FormToEmail.php
     
  3. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    in formToEmail.php
     
  4. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    OK I did that in FormToEmail.php:

    The error no longer appears but the buy.html page still always just redirects automatically to the nostock.html page.
     
    Last edited: Apr 26, 2008
  5. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    if i go to your "getnumber.php" page, it says "Error (page does not exist)"
    i suppose this is your custom 404 page?
    verify wether "getnumber.php" exists
    code:
    PHP:
    <?php

    //File.
    $file "num.inc";

    //Set filehandle.
    $fh fopen($file"r");

    //Read file.
    $number fread($fh1024);

    //Make an int.
    $number = (int) $number;

    //Return the number.
    echo $number;

    ?> 
     
    Last edited: Apr 26, 2008
  6. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    no, the page does not exist, I haven't made it yet. also the page is called nostock.html not nostock.php
    Edit:
    what is that code you have posted?
     
    Last edited: Apr 26, 2008
  7. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    Stupid as I am, I've made a stupid mistake, it's getnumber.php that has to be made, not nostock.html

    It's final:
    it's not possible to change .html from text/html to application/x-httpd-php
    (you have to use .php for all pages with php code)
     
    Last edited: Apr 26, 2008
  8. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    but getnumber.php already exists
    Edit:
    if you view getnumber.php it displays "-1" maybe that is the problem?
     
    Last edited: Apr 26, 2008
  9. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    urgh, i keep making those stupid mistakes... typing html instead of php, etc etc...

    anyway, your redirect is right, getnumber returns -1, which is not supposed to happen if you have entered 4...
    time to go hunt for the line of code that guy made that is now ruining our day!

    Edit: or it might be you too...
    http://www.lights4yourpc.com/num.inc returns -1 as well!
    try changing it to something bigger then 0...
    meanwhile i'll try to find the line that distracts one from the number
     
    Last edited: Apr 26, 2008
  10. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    OK! THANKS!

    should we go on instant messenging?
     
    Last edited: Apr 26, 2008
  11. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    could be useful... maybe x10 doesn't like us posting 10 mill messages?
    got msn?
    wereldoverheersing at hotmail dot com
     
  12. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    I've made a nostock.html now
     
  13. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    ok, it's actually not a priority
    have you changed num.inc yet?
     
  14. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    changed what about it?
     
  15. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    the content, it's -1 atm
    that's causing the redirects all the time
     
  16. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    no it's not, it's 4
    the num.inc file is 4
     
  17. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
  18. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    maybe I encoded the file in the wrong format becuase when I open it in notepad it read 4
     
  19. marshian

    marshian New Member

    Messages:
    526
    Likes Received:
    9
    Trophy Points:
    0
    can you send it to me then?
    EDIT: looks right to me :s
     
    Last edited: Apr 26, 2008
  20. bigjoe4

    bigjoe4 New Member

    Messages:
    907
    Likes Received:
    0
    Trophy Points:
    0
    I will delete the file off theserver and upload it again just to be sure
     

Share This Page