Jump to content

Soti-Dragon

Members
  • Content Count

    824
  • Joined

  • Last visited

Everything posted by Soti-Dragon

  1. Most people I know (especially coders and myself) have JS disabled by default, and manually enable it for some sites if they absolutely require a particular feature. The main reason is, JS does client side manipulation of the site rather than server side, and we (being all the people I know that have JS disabled), prefer to know exactly what a website is trying to do to our browser, and with JS disabled what we see is what they were letting us see, not what they were forcing our browser to do. So yes, a lot of people have JS disabled.
  2. I would recommend PM'ing the site owner: Ext3h
  3. I know we are speaking in emails bbik, but still, I would like to wish you luck repairing your site, and if you need a second pair of eyes to look over something, I can always make another coffee to keep me going to help you out.
  4. 60.88561% - Extreme Geek
  5. I think I understand what you are trying to say ... I will say it in pseudo code, because I can't be bothered thinking of the proper syntax. Read scroll Display check boxes User checks some boxes Click submit Read scroll into temp array loop through temp array if statement (comparison) ... is item from temp array in the codes array ... if yes then selected, if no then unselected. Display status The other method is the reverse of that ... Read scroll Display check boxes User checks some boxes Click submit Read scroll into temp array loop through codes array remove item from temp array if it exists What is left in temp array is unselected items, what is in codes array is selected items Display status.
  6. Because you have a typo ... It should be ...
  7. SELECT [B]*[/B] FROM [B]db_table[/B] [U]WHERE code='$blah'[/U] [B]ORDER BY rand()[/B] [B]LIMIT 10[/B] * -- Can also be the fields in the database. db_table -- The name of the table. LIMIT 10 -- The number is how many record you want to show, can be any number. ORDER BY rand() -- Randomly picks entries from the table. WHERE code='$blah' -- optional part of the query. Then run a while loop through it all to display. $sql = mysql_query("SELECT * FROM db_table ORDER BY rand() LIMIT 5"); while($object = mysql_fetch_object($sql)) { $code = $object->field_name; print "<img src=\"http://PLEASE_READ_THE_RULES_BEFORE_ATTEMPTING_TO_POST_YOUR_EGGS$code.gif\">"; } That is from the top of my head, I may have my syntax slightly wrong, but I believe that code to be correct. For some tutorials that I have put together ... check http://www.jaemeia.net/guides.php
  8. You do realise that there are a couple of examples in http://dragcave.net/api.txt that you can modify to get the answer. It is even easier if you know how to code.
  9. Viewers are easy. A simple database query in PHP $blah = mysql_query("SELECT * FROM table_name ORDER by rand() LIMIT dingo"); The blah is your variable to grab the information. Parse it through mysql_fetch_array or mysql_fetch_object and a loop if need be. table_name is your database table rand() is to give you random ones to be fair on everyone dingo is the limit you want to set. bingo! viewer made ... Can use JavaScript to make the page refresh, the problem with that is ... a lot of people disable javaScript because JavaScript is designed to use the users browser and the users os to manipulate the page. For a guarenteed way, even if JS is disabled on the users PC, is to place a refresh into the meta tags. <meta http-equiv="refresh" content="5;url=bob.php"> bob.php should be the name of the page you want refreshed. This is also a good way to do a redirect after a certain period of time. Hope that helps.
  10. My server did anywhere between 150-200 GB of traffic a month when the Soti Fansite was running ... admittedly I have other things on the server as well ... but about 95% of my traffic was DC related. So I would look for something that lets you do that much traffic.
  11. I wasn't suggesting that page scraping was the only way, or the best way, it really all depends on what they are trying to do, and as to whether they want to use the API. TJ does on occasion block sites from page scraping, trying to force them to use the API. Once he blocks the ER I setup from page scraping, that is when I will withdraw all support and assistance to DC, and will consider it just another chapter finished. Kind of like when Boramir gets killed in the Lord of the Rings, we hear mention of him again from time to time, but no-one really cares, cos the character is dead.
  12. Odd, because it works in the ER that I setup.
  13. I am not offering to code it for you, I have too many other things going on right now, but if you do get stuck, then feel free to send me a message, and I will have a look and see what help I can give you.
  14. API access gets you a lot of details, there were always more details that I wanted in the API, but it gets you a lot of them. The other alternative is page scraping, that will also get you the information you need.
  15. @bbik: Glad to be of service
  16. There is an easy way, just check to see if the dragon is frozen, just check to see if there is time remaining. Adults and frozens don't have time remaining so you can filter them out. $id=$_POST["id"]; @$doc = new DOMDocument(); @$doc->loadHTMLFile('http://dragcave.net/view/' . $id); $tags = $doc->getElementsByTagName('div'); foreach ($tags as $tag) { $tag->getAttribute('id'); $tag->getAttribute('href'); $source .= $tag->nodeValue."\n"; } $pos = strpos($source, "Egg will die if it doesn't hatch in: "); if ($pos === false) { $pos = strpos($source, "Hatchling will die if it doesn't grow up in"); if ($pos === false) { $allow = "NO"; // Adult and frozen checker } } Here is a basic test for frozens and adults, written in php, not sure what you are coding in, but hey, it gives you something to think about. Try adding something like if($allow == "NO"); { // reject code here ... eg print "Sorry, adults and frozen hatchlings are not accepted here"; }
  17. I would say your coding language depends on which platform your host will provide. Also, amke sure you use a host that allows a lot of traffic, because if you code it well, and if people get into it, you can end up doing a lot of traffic. If you are using windows, you could code in ASP and other such languages. I prefer *nix based systems. The server I own uses linux. But unix works just as well. If you are using a *nix based system, the easiest to code in is PHP, although you could probably use java or some other sort of language, such as perl even bash if you can code the cgi well enough. PHP can also be used on some windows boxes. So first find a host that will allow you to run the coding languages you chose to use. My site was coded in PHP. So that is what I would recommend learning. HTML and CSS coding is good to make it pretty, but you are going to want one of the languages above to do some server side programming. HTML and CSS will still be required to display to the webrowser. You might also want to use a database such as MYSQL or ORACLE or POSTGRESQL. Again I use MYSQL, but there are a lot of one to use. The basic setup ... ENTERING INFO TO THE SITE Create a form in html Send info to PHP file run any checks on the code that you want to perform. enter into the database display error or success message. DISPLAYING INFO FROM THE SITE create php script to grab information from the database display on page That's basically it. If you chose to use PHP as I did, and as most sites do (including DC), then you can have a look at this site: http://www.php.net/ If you want some mysql help, I would say have a look at this site: http://www.pantz.org/software/mysql/mysqlcommands.html But with those two links, plus some html (css optional), then you can make a self serve hatchery.