Yeah I am not really a PHP coder that much so I really suck. I am mostly a Java coder but, can someone code me a php script? Please if you want to help ask questions here and PM Derek the code (Since I can't receive PM's). I will give point rewards once they come back. Eh, i'll even put a link to your site on the page so that thousands of people who submit their eggs or hatchlings can see it.
I would like a script where it gets eggs from http://dragcave.net and it displays them so people can get views. There are eggs, hatchlings and ER.
http://greg-kennedy.com/dragcave/ < -- Example
http://www.dailydragonfix.com/
http://dragonnery.info/ <--- Example
An "ER" which means it detects if the hatchling or egg is 4 days or less and adds it there.
http://www.jaemeia.net/er/
Another example: http://lair.silverdrak.de/
Basically it's like a script where a person enters their scroll and the script goes to that persons scroll and looks up the 4 digit codes and stores them and displays them and at the right time when he hatchlings and eggs are grown they are auto removed.
http://forums.devnetwork.net/viewtopic.php?f=1&t=92378 Someone tried to develop it there. Can try using that code.
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
Viewers are easy.
A simple database query in PHP
CODE
$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.
CODE
<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.
I would like a script where it gets eggs from http://dragcave.net and it displays them so people can get views. There are eggs, hatchlings and ER.
http://greg-kennedy.com/dragcave/ < -- Example
http://www.dailydragonfix.com/
http://dragonnery.info/ <--- Example
Dragonnery said:Welcome!
You are in a place, where you can add your Dragon Cave eggs and hatchlings, and, hopefully, help them grow.
This site is fully automatic, so once you add an entry, it will be:
classified as either egg or hatchling
will change from egg to hatchling once it hatches, but won't be removed from the site
hidden eggs and hatchlings won't be displayed, but also won't be removed from the site, and, once unhidden, will be displayed again
grown up or frozen hatlings will be removed automatically
entries that have 3 or less days will be automatically added to the EMERGENCY list
That's the way it is done here and by placing your eggs and/or hatchlings you agree to all of the above. You also agree not to have any claims or grudges if your egg or hatchling will be accidentaly removed from this site.
How does it work?
To place your entries, clik on the "Add entries" button. Type your scroll name, press "Go!". A list of your available eggs/hatchlings will appear. Check all entries you wish to place. Previously added entries will already be checked, so remember to uncheck anything you want removed. Press "Add entries!". And that's it!
To add an EMERGENCY, click on the "EMERGENCY" button. Type the egg/hatchling code and press "Rescue me!". If the entry is valid for rescue, it will be added.
The site is constantly displaying a random set of eggs, a random set of hatlings and all of the emergensy entries. Every egg and hatchling is clickable - the DC site opens in the frame on the bottom of this site.
Remember! This site doesn't force anyone to do anything: no registration, no special amount of clicking is required. However, to work, the site needs views. If you really like it, make it your home page or otherwise make sure to visit it several times a day. A bit of clicking is recommended too.
To give views you can use Automatic refresher. Just click the "Automatic refresher" button and leave the window, that will appear, open for as long as you can.
An "ER" which means it detects if the hatchling or egg is 4 days or less and adds it there.
http://www.jaemeia.net/er/
3 days 23 hours is the highest you can add.
The time was increased to 4 days due to TJ's new code allowing hatchling after 3 days. Enjoy the views everyone.
Want to be able to remove your own Egg or Hatchling from the ER? Now it is possible!!! Isn't that cool.
All you need to do to remove something from the ER is to try and add the code again.
The following will happen:
If the egg or hatchling has over 4 days remaining, it will be removed.
If the egg or hatchling is dead, it will be removed.
If the egg or hatchling is fogged, it will be removed.
If the hatchling is frozen, it will be removed.
If the hatchling is now an Adult, it will be removed.
If the egg or hatchling is still considered an ER patient, it will remain.
How do you remove an egg or hatchling from the ER, while it is still considered an ER patient? Simple, just fog it and then re-enter the code.
Another example: http://lair.silverdrak.de/
Basically it's like a script where a person enters their scroll and the script goes to that persons scroll and looks up the 4 digit codes and stores them and displays them and at the right time when he hatchlings and eggs are grown they are auto removed.
http://forums.devnetwork.net/viewtopic.php?f=1&t=92378 Someone tried to develop it there. Can try using that code.
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
Viewers are easy.
A simple database query in PHP
CODE
$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.
CODE
<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.
Last edited: