Jump to content
xisto Community

vujsa

Members
  • Content Count

    1,008
  • Joined

  • Last visited

Everything posted by vujsa

  1. Generally speaking in PHP at least, the language file is nothing more than a list of defined constants. Like so: DEFINE('_LANGUAGE','en');DEFINE('_NOT_AUTH','You are not authorized to view this resource.');DEFINE('_DO_LOGIN','You need to login.');DEFINE('_VALID_AZ09',"Please enter a valid %s. No spaces, more than %d characters and contain 0-9,a-z,A-Z");DEFINE('_VALID_AZ09_USER',"Please enter a valid %s. More than %d characters and contain 0-9,a-z,A-Z");DEFINE('_CMN_YES','Yes');DEFINE('_CMN_NO','No');DEFINE('_CMN_SHOW','Show');DEFINE('_CMN_HIDE','Hide'); Basically, you load this file very near the top of your script. Probably after you determine the users preference and every time PHP comes accross one of your defined constants, it replaces the constant with the text.. Pretty simple, right? So here is some code for you to look at: <?phpDEFINE('_LOGIN_SUCCESS','You have successfully Logged In');DEFINE('_LOGOUT_SUCCESS','You have successfully Logged Out');if($new_session == TRUE){ echo _LOGIN_SUCCESS;}if($session_end == TRUE){ echo _LOGOUT_SUCCESS;} Now of course, you'll need to store the user's preference somewhere. If you will have regular members, you can set a default language preference in the database for the user but visitors will have to choose each visit. Take your pick as to how you will manage your user sessions and then adapt a language variable to that. You could set a long term cookie on the user's system to ensure that their prefered language is preselected but that is up to you. Good Luck. vujsa
  2. Mark420, glad to hear that the script is working exactly the way it was indended.I developed an FTP version that does the same process but offers the security benefits of requiring the FTP login information each submission. Also, the FTP version will ensure that the directories you create have the proper ownership.Let me know if you are interested in it and I'll pass it along.vujsa
  3. I think the forward slash after the domain is what is important! http://www.domain.com/ is a domain which may or may not have usefull information on it but http://www.domain.com/ looks like the url refers to a specific page on a website which prpbably hase useful information on it. Beyond the domain, I don't think that the trailing slash is helpful. These are very good tips but one thing to note, domains with hyphens or underscores will rank lower than without! vujsa
  4. While chatting with Mark420 today on the shoutbox, he mentioned that he was looking for a script to create his entire folder structure with just a click of a button. For example, he wanted the following folders created in his root folder by just clicking submit. /images /images/thumbs /images/icons /css /javascripts /content /content/articles /content/tutorials Presumably this would be used for some type of installation system or other quick server setup situation. Anyhow here is what I threw together for him: <?php /* ************************************************************ *//* *//* Configuration area *//* *//* ************************************************************ */// The total number of input boxes to show for the addition of foldernames:$size = 14;// Default root path$root = "/home/username/public_html";// An array of the default folders to be automatically inserted into the form.$default_folders = array('/images','/images/thumbs','/javascripts','/private','/css','/content');// File Mode (Permissions) - Ignored by Windows$mode = "0755";/* ************* DO NOT EDIT BELOW THIS LINE! ************* *//* ************* DO NOT EDIT BELOW THIS LINE! ************* *//* ************* DO NOT EDIT BELOW THIS LINE! ************* */function build_input_field($type, $name, $value = '', $size = '', $maxlength = '', $option = '', $prepend = '', $append = '') {// Function written by Marcus L. Griswold (vujsa)// Can be found at [url="http://forums.xisto.com/no_longer_exists/ Do not remove this header! $field = "<input type=\"$type\" name=\"$name\""; if($value) $field .= " value=\"$value\""; if($size) $field .= " size=\"$size\""; if($maxlength) $field .= " maxlength=\"$maxlength\""; if($option) $field .= " $option"; $field .= ">"; $field = $prepend.$field.$append; return $field;}if(!$_POST){ // Do Input form $page_title = "Handy PHP Folder Creation System - Start\n"; $body = "\t\t<div style='text-align: center; font-size: 18pt; font-weight: bold; color: navy;'><span>Handy PHP Folder Creation System</span></div><br />\n"; $body .= "\t\t<br />\n"; $body .= "\t\t\t<form action = '' method = 'post'>\n"; $input_field .= build_input_field('input', 'root', $root, 50, 255, 'title = "Insert the exact root path to the new folder you want to create."', "\t\t\t\tRoot Path: ", "<br />\n\t\t\t\t<br />\n"); for($x=1; $x<=$size; $x++){ $name = 'folder' . $x; $y = $x - 1; if($default_folders[$y]){ $value = $default_folders[$y]; } else{ $value = NULL; } if($x < 10){ $z = " "; } else{ $z = " "; } $input_field .= build_input_field('input', $name, $value, 30, 255, 'title = "Insert the relative path of your new folder without a trailing slash."', "\t\t\t\tFolder $x:$z", "<br />\n"); }$input_field .= build_input_field('submit', 'submit', 'submit', '', '', '', "\t\t\t\t<br />\n\t\t\t\t ", " ");$input_field .= build_input_field('reset', 'reset', 'reset', '', '', '', " ", "<br />\n");$body .= $input_field; $body .= "\t\t\t</form>\n";}else{ // Do the folder creation $page_title = "Handy PHP Folder Creation System - Finished\n"; $body = "\t\t<div style='text-align: center; font-size: 18pt; font-weight: bold; color: navy;'><span>Handy PHP Folder Creation System</span></div><br />\n"; $body .= "\t\t<br />\n"; $root = $_POST['root']; for($x=1; $x<=$size; $x++){ $folder_name[$x] = $_POST['folder' . $x]; $full_path = $root . $folder_name[$x]; if($folder_name[$x] && !file_exists($full_path)){ if(@mkdir($full_path, $mode)){ $body .= "<b>" . $full_path . "</b><span style='color: #230BFD;'> Was Created!</span><br />\n"; } else{ $body .= "<b>" . $full_path . "</b><span style='color: #FF1515;'> Was not created: Unknown Error!</span><br />\n"; } } else if($folder_name[$x] && file_exists($full_path)){ $body .= "<b>" . $full_path . "</b><span style='color: #FF1515;'> Was not created: Directory Already Exists!</span><br />\n"; } }}?><html> <head> <title> <?php echo $page_title; ?> <\title> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="author" content="M. L. Griswold / HandyPHP.com"> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" style="font-family:verdana; font-size: 10pt;"><?php echo $body; ?> <br /> For technical support for this script, please visit <a href="http://forums.xisto.com/no_longer_exists/; title="Handy PHP - A PHP Resource Site">Handy PHP</a>. <br /> <hr /> <br /> <center style="font-size:8pt;">Š2007 <a href="http://forums.xisto.com/no_longer_exists/; title="Handy PHP - A PHP Resource Site">Handy PHP</a></center> </body></html> There a couple of notes about this script though:This script offers absolutely no security features. This means that if made publicly available, anyone on the internet could create new directories on your server. You need to protect yourself by placing this script in a private or password protected directory on your server. If used on a unix/linux machine, the new folders will be owned by the server and not the account owner because the directory was actually created by the server! You must create the parent before the child! if you want /images/icons, you must either create /images first or is must already exist on the server! By modifying the configuration section of the script, you can make the scripts default values match your environment which will make the script easier to use. There is one thing that I request: Please leave the entire build_input_field function section of the script intact. It offers great flexability if use correctly and shouldn't require any modification for inclusion in any script. It is a function that I personally wrote and made publicly available to everyone to use. For more information about this and other functions I have written, please visit Handy PHP. Basically, if you want to use this function or redistribute it, leave it intact with the credit header. However, if this function inspires you to rewrite or recreate a function that performs the same task, I welcome you to do so. I'll keep you posted as to the developement of an FTP version of this script via this topic. vujsa
  5. No, but you can do it with a plain text file:https://support.google.com/webmasters/?answer=34657 http://www.domain.com/index?That is all ther is to it. The XML format isn't difficult though! XML is much like HTML in the way you write the files: <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="https://www.google.com/schemas/sitemap/0.84/; <loc>http://www.domain.com/index.html; <priority>0.9</priority> <lastmod>2007-01-01</lastmod> <changefreq>daily</changefreq></url><url> <loc>http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/; <priority>0.2</priority> <lastmod>2006-12-18</lastmod> <changefreq>monthly</changefreq></url><url> <loc>http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/; <priority>0.5</priority> <lastmod>2007-01-01</lastmod> <changefreq>daily</changefreq></url><url> <loc>http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/; <priority>0.5</priority> <lastmod>2007-01-01</lastmod> <changefreq>daily</changefreq></url><url> <loc>http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/; <priority>0.5</priority> <lastmod>2007-01-01</lastmod> <changefreq>daily</changefreq></url></urlset>I think it is pretty straight forward but is kind of time consuming at first it you don't have an automated system. For best results, you really should update the sitemap every time you make any change on your website. This will ensure that Google crawls the updated material as quickly as possible. Now as for getting your site listed in Google, it all depends a a very large number of variables. What is the content of your site. What sites is your url placed on and in what context. What search term were you using to find your website on Google Consider the following Google searches for my website: https://www.google.com/search?hl=en&lr=&q=www.handyphp.com&btnG=Search https://www.google.com/search?q=site:www.handyphp.com&hl=en https://www.google.com/search?q=link:www.handyphp.com&hl=en http://forums.xisto.com/no_longer_exists/ https://www.google.com/search?q=info:www.handyphp.com&hl=en https://www.google.com/search?q=related:www.handyphp.com&hl=en This looks better now that I have added a sitemap and it has been 4 months but in the beginning, I could get anything to show up for these but a search for PHP Reformat Date gave me hits. I also had to change from using the term "HandyPHP" to "Handy PHP". The first term didn't provide as many hits as the second one since the second one would hit for both "handy" and "PHP". Now if a search for "php array sort" is performed, I get hits! This is because I have content about a special array sorting method and my site has been associated with PHP. It is true that about 90% of people performing this search won't find my content helpful but I get the visitor anyhow! My point is that a search for "PHP" won't list my website in the first 30+ pages so that keyword is dead to me but when used with other keywords on my website, I get listed and usually a page hit. My point is that even if you don't see your website by doing a direct search for it on Google, there may be several listings for you based on your sites content and websites that link to it. vujsa
  6. Despite the fact that you didn't use English in your post, I feel your pain and have decided to try and help! It is possible that your power supply, a mere 210 watt box, is inadequate for long term use for your configuration. As a result, you may benefit from replacing and hopefully upgrading your power supply. I highly reccommend PC Power and Cooling. Even if you don't buy one of their products, you should read their articles about the subject! There is another potential cause of this behavior. Over heating! This is more than likely the true cause of this type of problem. The computer shuts down to prevent meltdown. For more information about cooling, check out this topic: http://forums.xisto.com/index.php?showtopi&hl=cooling Also, did you try a search on the forums? http://forums.xisto.com/index.php?showtopi&hl=cooling This is exactly what I am talking about here. So, read those post since they most likely have the answer to your question. To save some time, after you read those posts, buy 3 cans of air duster, unplug your PC, open the case and blow all of the dirt out! Be sure to really dust off the fans well. Dirty fans run slower! In the future, try the following: Buy a decent power supply large enough for your system. Place filters on your fan intake vents. Buy plenty of decent fans. Do a search of the forums. Use actual English. - If you are too lazy to ask for help in a way that everyone can easily read, then we may be too lazy to reply! vujsa
  7. Okay, I guess I may have under estimated your level of programming when I replied to you. Having a hard time with some of your questions. Seems like you have left some key factor out of your posts. I'm not usre what we are missing from the first post but in the second post, I know that I'll need to know the error messages you are getting in order to figure out the problem. Most of my tutorials are very general to leave users with a roadmap to building their own script however they fell most comfortable. As a result, I don't discuss error checking and security measures in any tutorials since everyone has their own method. I also don't go into much detail on script extras since they may not be used by the end reader. If you want to add something on to a tutorial, I think I leave it basic enough to adapt later. If I get too specific, then the script is much more difficult to adapt to the user's needs later. Basically, I discuss techniques and methods rather than actual scripts. Having said that, some time when I'm in a hurry, I don't actually run the scripts you see in the posts I write. I'll just start typing in the post box and use logic and my knowleged of php to output code for the topic. In the case of my previous post on this subject, I never tested the script and tested very little of the chunks of code used. I ran a few database queries to be sure I had the SQL correct but none of the PHP has been tested. So I don't have a working copy of a script for you to test on my server. So I'll need you to provide any error messages you have to me so I can figure out what went wrong. I'm sorry it has taken so long to reply to you. Kind of a busy time of the year for me personally and professionally. As for you date problem you requested help on, I'm not sure what the problem is without seeing some code but I'll give it a try. Usually, when I save a date to the databse, I prefer to use UTC which is the number of seconds since the Epoch (01/01/1970). It usually is a rather long number and is based on GMT so it will be the same for everyone everywhere and can be displayed based on the local timezone for local output to the user. This value can be obtained for the current time with time(); Now when you want to display a date, you have to use the date() function but have to specify the timesatmpt used or the current date and time will be used. If the current time is 12/18/2006 09:30PM and you use the following: echo date('Y-m-d'); 2006-12-18 will be displayed! But if you use a timestamp with the date like so: echo date ('Y-m-d', 1166365800); 2006-12-17 will be displayed. So if you don't specify a timestamp, the current time is used by default. If this doesn't answer your question, let me know. vujsa
  8. I guess I have been silent on this subject too long.Here are the drawbacks to both ideas:A referal system WILL be abused. We'll have normally good members either cheating or looking for ways to cheat. Crappy members will fill the forum with junk and fake member accounts in short time. I mean if a junk poster will post 30 one line posts just to get the 10 credits needed to apply for hosting, they will definitely create a multitude of junk email addresses for an extra credit or two. In the end, it will be a real pain for the staff to police the system and won't last long. I wish it wasn't like that.The best topic of the week idea seems pretty good on the surface but again has a bunch of issues involved in it. In the first place, it requires a lot of interaction from and between the staff members. We have staff members from all over the world. It takes us longer than a week just to agree on a new staff member and we still don't get input from all of the staff members. Trying to get everyone to read the same set of topics and provide an opinion would take about 2 weeks and then we still have to agree on the subject! What if there is a tie in the number of votes. What if you are like twitch where you write pretty good posts but nobody on the staff likes you? (Using twitch as an example since he won't get all upset and used to be on the staff.) Oh, there are ways to cheat this system as well if we usesome type of grading system.At the end of the day, it doesn't really matter what my opinion is or the opinion of the satff. I already know OpaQue's opinion which is that you get free host for posting. You earn hosting credits based on a fair and completely automated system. Our system is probably the fairest and most desirable on the internet. The concept was to pay for the hosting with income generated by the advertising on the forums which is viewed by the posters and readers but that system doesn't work! The advertising only covers less than 10% or the hosting costs. So, the credits are already more fair to the user than to the forum.Here is the general opion of the administrators:If you refer a friend to the forums, then you will have one more person that may reply to your post providing the opportunity for you to reply to the reply. The more replies your post gets the better the chance there is that you can follow up with a reply. Every psot gets a few more credits so more memebrs automatically generates more chances to posts and ths more cahnces to earn credits. Basically, refering a friend already earns you more credits indirectly.Additionally, the best topic of the week already earns you more credits indirectly. If your topic is good, many users will reply and each of those replies is a chance for you to follow up on. So if you wanted to grade the topics based on the number of replies or number of views, we already do. Those topics already earn everyone active in them more credits. This is the point that I have tried many times in the past to make but it seems to fall on deaf earms usually. better posts and more members makes this great system even better for the users involved. Generally a good post is usually a little larger than most and that earns a few more credit. It generates more interest so more members earn credits by being active in a good topic and the topic starter usually has many more opportunites to earn creidts by leading and responding to the discussion.For the most part, the best changes we have made to the forums involves reducing the number of decisions that staff members need to make. The less often we have to use our judgemant, the less often we make mistakes. We used to have to edit everyone's posts for them in order to keep the credit system from being cheated which was a lot of work and resulted in many more errors. Most of us just want to keep the forums clean and answer any questions the members have. It is akward for us to police and award members for various reasons. Basically, the less complex we make the system, the happier the majority of members will be.Having said this, I will forward your thoughts on to OpaQue and see if his opinion has changed with regards to this subject.vujsa
  9. So while doing some analysis of my website, I came across a website that has archived views of most websites. https://archive.org/ is the address. While my website, Handy PHP, isn't old enough to be included, I decided to take a look at Xisto.com and see what was going on before I found it and it hadn't really changed that much. So I took a look at Xisto.com since it was older than Xisto. Wow!!!!!!!!!!!!! Turns out that Xisto is even older than I thought! I guess OpaQue or some previous domain owner used the domain for something else for a short time 3 years before the free web hosting website was started! 06/02/2001 - Xisto - index I guess that OpaQue was a fan of Microsoft back in the day: 06/05/2001 - Xisto - cyber1.htm Anyhow, I thought this was kind of interesting. Here is the complete archive list for Xisto.com: All - Xisto - index The 1996 version of Yahoo.com is pretty hard to believe. Notice from jlhaslip: Merged with a similar topic previously posted
  10. How about the use of mod_rewrite to solve the problem. The browser will think that the script is a zip file and the server will parse it as PHP! RewriteEngine onRewriteRule ^file\.zip$ downpos.php? You would still need some header information for it to work but since the browser sees a ZIP extension and that is what is sent, there shouldn't be much of a problem. It seems that the smarter they make the browsers the dumber they act! This also gives the "ZIP" sript the illusion of being an actual file instead of a script. vujsa
  11. Yeah, I generally like to maintain at least 150 credits. You know, just in case something happens like I slip into a comma for 5 months. Some of the heavier posters have well over 500 and microscopic^earthling takes the cake at over 800. Right now I'm floating around that 220 mark and find it difficult to stop accumulating more credits. Seems like I earn credits every time I post here. Anyhow in all seriousness, the credit purchasing concept is a good one. While we prefer everyone to just remain active, we understand that sometimes things come up and it is hard to post as a result. The best part of the credit system is that in is inherently a rollover system. Since your credits never expire, purchasing them in addition to what you earn from posting is the most economical method for web hosting. True paid hosting requires you to pay every period no matter how much you contribute otherwise. Credit buying allows you to simply extend your hosting duration. Maybe we should have a credit lottery too. vujsa
  12. Well, I just couldn't resist getting involved. I just spent the last 2 hours writting a script to do this for you. It is PHP based and you may have to move your files to your web root to work but it will strip all of the unwanted formating from your filenames. In linux, you may also need to change the file permissions to do the rename. The script is completely insecure and needs to be placed in a secure location such as a password protected directory. Failure to secure this script will give anyone with public access to your system the ability to rename ALL of your files. This is a very dangerous script if use improperly. The script may be found here: http://forums.xisto.com/no_longer_exists/ Registration is required for download, sorry. I do this to prevent excessive automated downloading by theft bots etc... I hope this helps. vujsa
  13. As I understand your question, you are wanting to save the various components of your template in a database instead of the file system. Is this correct? Well, you don't use includes for that operation. Instead, you will use various mySQL functions to retrieve the data. In CMS102 - Content Management System Design, Basic CMS With PHP & Flat File Databases I showed you how to use a dynamic URL to determine which content to display on your website. For example: http://forums.xisto.com/no_longer_exists/ Would show the standard webpage for your site with the news.php file as the content and the header1.php file as the page header. What I think you are wanting is to save the data in news.php and header1.php in a database table instead of in a file. So instead of creating a file and adding data to it to save in your file system, you need to create a new record in your database. If news.php had the following data in it: <b>D-Day!</b><br><i>By vujsa</i><br>June 7, 1944<br><br> Yesterday the Allied forces invaded Normandy, France in a effort to gain a foothold in the war with Germany.....<br><br><br><b>Japan Attacks Pearl Harbor!</b><br><i>By vujsa</i><br>December 8, 1941<br><br> Sunday, December 7, 1941; The Japanese navy launched an attack on Perl Harbor near Honolulu, Hawaii. The attack lasted....<br><br><br>etc, etc, etc,...Then instead of savinf that information as a file, you would save it into your database table. You'll need some structure to your database table to get it to work correctly. At the very least, you need 2 fields (columns)."name" and "body". So first we need a database table to work with. If you don'tknow how to create a table or a database for this operation, please search the forums before continuing. We'll name our content table "mycms_content". We'll use the "mycms_" prefix for all of our tables related to the CMS so that we don't get confused later! In "mycms_content", we need to create a field named "name" as the type "tinytext". Then we create a second filed for the data named "body" as the type "text". Although we really don't need it, we will also ad a field for the record id. This isn't needed as long as the table remains simple but if additional fields are added later, then we'll need this. Might as well plan ahead now. The third field is "id" and is of the type "tinyint"; it should auto_increment , be the record key and should be unique! Here is the SQL command for creating the required table: CREATE TABLE `mycms_content` (`id` TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TINYTEXT NOT NULL , `body` TEXT NOT NULL ) TYPE = MYISAM ; Then you just insert the data and name of your content into the table with the following SQL command: INSERT INTO `mycms_content` ( `id` , `name` , `body` )VALUES ( NULL , 'news', '<b>D-Day!</b><br> <i>By vujsa</i><br> June 7, 1944<br> <br> Yesterday the Allied forces invaded Normandy, France in a effort to gain a foothold in the war with Germany.....<br> <br> <br> <b>Japan Attacks Pearl Harbor!</b><br> <i>By vujsa</i><br> December 8, 1941<br> <br> Sunday, December 7, 1941; The Japanese navy launched an attack on Perl Harbor near Honolulu, Hawaii. The attack lasted....<br> <br> <br> etc, etc, etc,...' );We now do the same for our header1 data! INSERT INTO `mycms_content` ( `id` , `name` , `body` )VALUES ( NULL , 'header1', '<a href="http://forums.xisto.com/ src="/style_images/astalogo4ly.gif;");Basically that is just a banner ad for Xisto! Congratulations, you now have your content in your database. But how do you get it out now? Going back to our sample URL: http://forums.xisto.com/no_longer_exists/ We start our PHP script in the usual way but then it will change quickly! <?php$page= $_GET['page'];$header= $_GET['header'];?>Now all the script is doing is finding out what page and header were requested. We have to do a database query to find the required content. Here is the SQL command to use to find our "news" content: SELECT `body`FROM `mycms_content` WHERE `name` = 'news' LIMIT 0, 30 In PHP, that would look something like this: $sql = 'SELECT `body` FROM `mycms_content` WHERE `name` = \ 'news\' LIMIT 0, 30 ';So for us to fully retrieve our content and use it, we do the following:Some of this is basic SQL scripting that I won't go into here. Learn more about it by searching the forums. <?php$page= $_GET['page'];$header= $_GET['header'];$connection = @mysql_connect("localhost", "username", "Pa5Sw0rD") or die(mysql_error());$db = @mysql_select_db("My_DataBase", $connection) or die(mysql_error());$sql = "SELECT `name` FROM `mycms_content` WHERE `name` = \ '". $page ."\' LIMIT 0, 30 ';$result = @mysql_query($sql, $connection);if (!$result) { echo 'Could not run query: ' . mysql_error(); exit;}$row = mysql_fetch_row($result);$main_content = $row[0];$sql = "SELECT `name` FROM `mycms_content` WHERE `name` = \ '". $header ."\' LIMIT 0, 30 ';$result = @mysql_query($sql, $connection);if (!$result) { echo 'Could not run query: ' . mysql_error(); exit;}$row = mysql_fetch_row($result);$main_header = $row[0];?>Okay, that is the most direct and ugly way to get your data from the database! All we did was search the database to get the body of the file who's name matched what the value was in the dynamic url. In this case we searched for "news" and "header1"! That definitely needs some optimization later but now let's just get to the content insertion section. In CMS102, I said that where ever you wanted your main content, you would use this: <?php include($main_content_file); ?>! That has now changed since you are no longer going to include a file but instead you will be echoing a string of content. Now where ever you want your main content, use this command: <?php echo $main_content; ?> The same is true for the positioning of your header data but the variable would be $main_header! That is the rough explaination of the system. You would still have to design a database interface for inserting, editing, and removing content from your website but that is a whole other discussion for later I guess. I reccommend writing a function to handle your database query instead of writing a new query for each content section of your website. The key is to have the PHP handle as much of the work as possible so using functions and loops will save you a lot of work in the long run. Let me know if there is more information that you need about this. vujsa
  14. Well, here goes. Most of the settings are supposed to be unlimited! The number of domains error is due to external server processes reconfiguring the server records and causing the read-only mode. this is for your protection. Currently, we are migrating several hosting accounts between servers and while they are being proccessed, the server goes into read only mode and the editing of certain settings like domains and, subdomains, etc are offline. This prevents data being lost during the transfers previously mentioned. It would be like your computer telling you no when you try to burn a DVD during a virus scan. It saves everyone a lot of trouble in the end. The cycle goes like so: Server goes into read only mode which usually doesn't affect the end user of your website unless you use some old flatfile database system The server processes whatever tasks it was told to work on. The server finishes the processes and updates the server configuration. The server reboots and finished the reconfiguration process. The nameserver, mySQL server, mailserver are all relinked and the hosting service is back to 100% again. This whole process usually only takes about an hour. Today seemed to be longer. If you have specific issues with your cPanel, please request support for it. Posting a general problem during a general outage in a less than descriptive way doesn't help.
  15. Well, I've done quite a bit of work on the content of the website. The presentation still needs some work but all in all, the website is functional. Currently I have 9 custom PHP functions, 1 tutorial, and 2 Joomla! plug-ins available. I've also installed a very basic forum and have started providing support for my scripts with it. Additionally, I have started taking requests for more Joomla! plug-ins. While I don't want the focus of the website to be Joomla Extensions, it has really been a boost to the number of visitors I have received.Most of my visitors just come, register, and download the Joomla! plug-in they wanted but a few stick around and browse a while. I'm hoping that I'll get some word of mouth traffic from these downloaders. While most of my visitors are looking for Joomla! Extensions, I'm also seeing an increasing number of visitors from the search engines and resource indexes. The best part about these non-Joomla! related visitors is that they are looking at quite a bit of the site and are interested in the core subject of the website. Google has done a very good job of determining the content of my website. :rolleyes:I'm still working on a few of the features that the website will need but most of it is operational. The link directory is installed and being populated but not made viewable to the public yet. The user submitted resource option isn't finished yet but I don't see that this is holding anybody back yet. So far, most of the website activity is outgoing only. Not a lot of user interaction so far. I've been kind of busy with the developement of content so I haven't had much time for addition or developement of features. :)My real concern now is user retention and behavior. What I really want is to find out if they are finding the information they needed or not. This of course will require the developement of a content survey script. Like "Was this resource helpful?" questions.I can see what people were searching for and what their search engine query was but I don't really know if what they asked for is what they wanted or if I provided it if it was.Anyhow, I think I know what the site needs visually but what do you think about the content and features?Thanks for any input.
  16. Yeah, don't do that again. When someone has an answer for you, they will reply. Don't post the same one line message over and over again. To begin with, the error message already tells you what to do! Assuming that you only have one field set for auto-increment, then go and set that as the table key! If you have more than one field set for auto-increment, then unset the one that isn't correct. Next time you want help with something, try to include some information with your request like an actual request. vujsa
  17. Not a 100% sure that I have any clue as to a suggestion of what you might be talking about. But if you don't have access to statistical analysis software on your server but you do have access to the raw server logs, then you can use a common database program like MS Works Database to sort the data. You'll also need some text editor that can do a pretty good job os find / replace! Using your text editor's find / replace, you have to replace all of the spaces between each element of the entry (row) with a tab. By adding a tab between each element, you are basically placing them in seperate columns of the database. In the database program of your choice, create a new database with enoulgh fields for each element in the log entry. This will usually be 9 without domain names an 10 with. Additionally, if you chose to not convert some elements or leave combined; you won't need as many. Then copy all of the rows and paste in the first column / first row of your database table view. You should now have a nice table of server log data. You'll need to adjust the width of each column to be able to read everything. Now that you server log data is in a database, you can select multiple views of the data, create various reports and sort by what ever you want. [/hr] To be more efficient, you might want to create a script that prepares your data for you. Using PHP and preg_replace() with regular expressions, you could insert your tabs in just a second if done correctly. The best part about that is that you can reuse the script each month to prepare your data. If you are unsure how to prepare your data to be entered into the database or would like more information on writting a script that would prepare your data, please feel free to reply here. This may not be as fancy as the results from a statistical analysis program but the infrmation will be just as useful. If you prepare your reports properly and really decide what information you really need, you may find this approach even more beneficial than the results from a statistical analysis program. Hope this helps. vujsa
  18. Yeah, the myshost was destin for failure. They made an atempt at first to mimic Xisto and offer free webhosting for posting but never followed through with their members. Then they tried to do free domains for posting but that also didn't work. They didn't have any content and I personally banned one of their moderators from here because he chose to steal content from here to post there and had a problem posting plagiarized material here. I requested that they remove the content several times but no reply was made. At the end of the day, free hosting for posting is a losing endeveur. Only about 10% of our free hosting cost is paid for with the advertising on the forum and that doesn't include the cost to host the forum! The only reason we have this fantastic service is because the owner of the website is a really good guy and he usually makes enough from the paid hosting to pay for it. Free domains are about the same. They cost a lot less but for it to be profitable, most of our members would have to post hundreds of posts to earn a domain name. This isn't because the domains are expensive, it is just that the advertising income from a single post here is very little. But at $6.95 this month at GoDaddy for .COM's, I think most people can come up with the money. Can't hardly buy lunch for that! vujsa
  19. Many website owners have no idea why people visit their site and even more have no idea why people don't visit their site. Using your server's weblogs as a valuable developement tool can help you figure out what your visitors like, dislike, where they came from, and where the didn't. Here I'll brifly explain how to read your web logs and more importantly what to do with the information. Let's start with some raw weblog data: 70.116.XX.XX - - [20/Nov/2006:06:28:21 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/91791-topic/?findpost=1064359825; "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"213.227.XX.XX - - [20/Nov/2006:07:16:46 +0000] "GET /req_form.php?sitename=Xisto&formname=new HTTP/1.0" 200 6216 "http://ww4.forum500.com/; "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text"213.227.XX.XX - - [20/Nov/2006:07:23:06 +0000] "POST /req_form.php HTTP/1.0" 200 4101 "http://ww4.forum500.com/; "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text"213.227.XX.XX - - [20/Nov/2006:07:25:46 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 167999 "http://forums.xisto.com/topic/91739-topic/?findpost=1064359477; "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text"213.227.XX.XX - - [20/Nov/2006:07:26:19 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 167999 "http://forums.xisto.com/topic/91264-topic/?findpost=1064355980; "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text"74.6.XX.XX - - [20/Nov/2006:08:03:11 +0000] "GET /robots.txt HTTP/1.0" 404 - "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="https://help.yahoo.com/kb/search/SLN22600.html?impressions=true)""]http://help.yahoo.com/help/us/ysearch/slurp)"[/url]74.6.XX.XX - - [20/Nov/2006:08:03:11 +0000] "GET /req_form.php?sitename=Xisto&formname=intro&introname=new HTTP/1.0" 200 3616 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="https://help.yahoo.com/kb/search/SLN22600.html?impressions=true)""]http://help.yahoo.com/help/us/ysearch/slurp)"[/url]134.173.XX.XX - - [20/Nov/2006:08:45:14 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/91792-topic/?findpost=1064359827; "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"68.58.XX.XX - - [20/Nov/2006:09:07:42 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)"68.58.XX.XX - - [20/Nov/2006:09:09:12 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)"64.233.XX.XX - - [20/Nov/2006:09:16:24 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/91791-topic/?findpost=1064359825; "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"38.113.XX.XX - - [20/Nov/2006:09:58:53 +0000] "GET /robots.txt HTTP/1.0" 404 - "-" "voyager/1.0"38.113.XX.XX - - [20/Nov/2006:09:59:08 +0000] "GET /req_form.php?sitename=Xisto&formname=intro&introname=new HTTP/1.0" 200 3695 "-" "voyager/1.0"211.28.XX.XX - - [20/Nov/2006:10:28:29 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/86545-topic/?findpost=1064322153; "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"82.171.XX.XX - - [20/Nov/2006:10:30:32 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/86545-topic/?findpost=1064322153; "Opera/9.02 (Windows NT 5.0; U; en)"202.7.XX.XX - - [20/Nov/2006:13:16:29 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 167999 "http://forums.xisto.com/topic/86545-topic/?findpost=1064322153; "Opera/9.00 (Windows NT 5.1; U; en)"202.7.XX.XX - - [20/Nov/2006:13:17:42 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 167999 "http://forums.xisto.com/topic/90939-topic/?findpost=1064353509; "Opera/9.00 (Windows NT 5.1; U; en)"74.6.XX.XX - - [20/Nov/2006:14:06:27 +0000] "GET /robots.txt HTTP/1.0" 404 - "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="https://help.yahoo.com/kb/search/SLN22600.html?impressions=true)""]http://help.yahoo.com/help/us/ysearch/slurp)"[/url]74.6.XX.XX - - [20/Nov/2006:14:06:28 +0000] "GET / HTTP/1.0" 200 1243 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; [url="https://help.yahoo.com/kb/search/SLN22600.html?impressions=true)""]http://help.yahoo.com/help/us/ysearch/slurp)"[/url]129.184.XX.XX - - [20/Nov/2006:15:27:17 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.1" 200 168311 "http://forums.xisto.com/topic/91791-topic/?findpost=1064359825; "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)"202.7.XX.XX - - [20/Nov/2006:15:34:36 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 151807 "http://forums.xisto.com/topic/91664-topic/?findpost=1064358850; "Opera/9.00 (Windows NT 5.1; U; en)"65.254.XX.XX - - [20/Nov/2006:15:44:54 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 27404 "http://forums.xisto.com/topic/90705-topic/?findpost=1064351612; "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"65.254.XX.XX - - [20/Nov/2006:15:46:39 +0000] "GET /sig/sig_gen/mysig2ba4a515fff0a55d.png HTTP/1.0" 200 167999 "http://forums.xisto.com/topic/86369-topic/?findpost=1064320830; "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"That is a lot of data without much explaination: So lets take a look a the first line. 213.227.XX.XX - - [20/Nov/2006:07:16:46 +0000] "GET /req_form.php?sitename=Xisto&formname=intro&introname=new HTTP/1.1" 200 3709 "http://forums.xisto.com/topic/87623-topic/?findpost=1064330531; "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8" 213.227.XX.XX - This is the visitors IP address. We all have one. It is the address assigned to our account at the time of connection to our service provider. - - - This is usually where the user's service providers domain information is stored but many times is turned of to reduce server stain. [20/Nov/2006:07:16:46 +0000] - The date and time GMT of the request. "GET - Method used for the request on the server (GET or POST) /req_form.php?sitename=Xisto&formname=intro&introname=new - The path from the root for the file being requested. HTTP/1.0" - The protocol being used. 200 - The server status code. 6216 - Number of bytes sent "http://ww4.forum500.com/; - The refering url. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5 Firefox/1.5.0.6 pango-text" - The user's client (Web Browser or robot). So now I know which user accessed which file at what time with what browser and most importantly where the user came from. [/hr] From our sample, we can see which file is most common on theis domain. /sig/sig_gen/mysig2ba4a515fff0a55d.png This happens to be my signature image which is located on about 1000 posts around the web! We can also see that the majority of referal urls are from Xisto.com Now that I know what my most popular file is and what my most common referer is, I can begin to plan a course of action for my website. This doesn't really apply to this file since it is just a signature image but let's imagine that it is a content article for the sake of this discussion. If I know that most of my viewers of this file come from Xisto, then maybe I should adjust the content to reflect the general preferences of Xisto users. In this case, if I was to add more information about free web hosting of being a webmaster, I would get a better retension rate. That is that if the users view that file's content and like it, they are more likely to view other content on my website. [/hr] Now that we have looked at something that is going right, let us take a look at what might go wrong. How many serch engine bots visited me during this period? 2 bots visited in the time period shown and one visited two seperate times. Here are the two bots that visited: "Mozilla/5.0 (compatible; Yahoo! Slurp; htt...)" "voyager/1.0" Now we all should know what Yahoo is and having the Yahoo Slurp stop by is a good thing. Having unknown or not well known bots stop by doesn't ususally hurt so we welcome the "voyager" bot. But in 9 hours, only 6 pages were viewed by the bots and one of those pages was actually a not found robots.txt file. We also don't see the ever important GoogleBot here nor do we see any referal links from the search engines. While this file is relatively popular, the rest of the website is pretty much dead and the only people that know about it are the members of Xisto and Xisto! Obviously there aren't going to any visitors from the search engines since the site isn't getting indexed and we haven't seen and referal links from the search engines. We can also tell from the number of different IP addresses used that we only received 13 users in this 9 hour period shown and those users only requested 23 pages. That includes the 6 requests made by the 2 bots. So the most populr file isn't even popular, nobody knows that the site exists, and the search engines don't like me! I'm so depressed now. [/hr] Now is the time to really analyze the data. A 9 hour period isn't going to provide a large enough sample to really determine what is going on. Maybe this is just the slow day of the week or maybe the other 15hour of the day were really busy. We really should look at the stats for the whole month. Unless you are an upper level genious and can mentally sort the data for an entire month in your head, you'll really need some kind of Server Statistics sofftwere like Awstats. This software sorts all of the data out and gives you charts and graphs along with other very useful information. No matter what method we use to sort the data, here is what we need to look at: How many page requests per day? How many visitors per day? What is the most common subject among the referal pages for your site? - For example, most of my visitors might come to my site after reading articles at Xisto. What do most of the articles have in common. Are most of them about Online Gaming or PHP scripting? What is the most common file request? How many search bots are visiting and from where? Analyzing these statistic will show you a few things but most importantly, what do our visitors think our website is about. If my Online Gaming website is getting most of it's hits from the PHP forums and most of the page requests are for a tutorial I wrote about keeping scores for online games with PHP, then it is likely that my visitors are looking for a PHP site so they are not interested in the majority of my content. This is a case of promoting my website in the wrong setting. I need to be promoting in Online Gaming related settings. You can submit your website a million times to each of the major search engines and never get crawled! The best way to get you site crawled by the spiders is to have your link on other websites that are being crawled. If you are not getting crawled frequently enough or if there are some bots that have never visited, then you NEED to fix that. It is great that I get a lot of traffic from Xisto and Xisto but 1% of the few thousand members on these sites compared to the 1% of the tens of millions of users of Google is a huge difference. It is still a good idea to subit your link to each of the search engines at least once to get the ball rolling. [/hr] Okay, you are finally getting crawled and you even are getting a few hits from the search engines. You can tell when you see something like this: 65.254.XX.XX - - [20/Nov/2006:19:46:39 +0000] "GET /content/view/1/1/ HTTP/1.1" 200 32768 "https://www.google.com/search?hl=en&lr=&q=php+leading+zeros&btnG=Search&%2334; "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"That means that this page was requested after the user performed a search for "php leading zeros" on Google. This is important becasue we now know that we actually have something that people are looking for! And since we know what the were searching for when they found it, we can ensure that the next search for the same thing is even easier by making sure that our content is related to "php leading zeros". If the content is directly related to the search term, then we have a winning page. If it is loosely related to the search term then we have a lead! We know that people have come to the site looking for "php leading zeros" but that isn't what we offer, YET! It might be a good idea to add content about the subject and link it to the page commonly mistaken for the content requested. Additionally, it might be a good idea to submit or discuss the page on a related website if permissible. Is there a link to this content item on the most common referal site? Maybe there should be. [/hr] Finally, if the overwhelming majority of visitors are coming from a certain type of site like a blog or forum, then it might be a good idea to advertise your site on these sites. These are usually cheaper than the major advertising programs and will be more focused. This is because if you offer $10.00 to a webmaster for so many impressions, they know for sure they will earn the money which isn't true with their affiliate programs. Good old fashioned link or banner exchanging may also work with smaller websites so don't disregard the free options. Your statistical data will tell you which advertisers are working and which are not as well as leading you in the direction of which to try to begin with. [/hr] I hope that this will prove to be useful information for all that read it. Here are a few related topics: Search Engine Optimization. Website Advertising. Keyword Analysis. vujsa
  20. I guess that this could just be you editor acting up. I'm not sure what your editor is set up to do with the various elements in your script. Here is what PHP Designer 2005 does with the code. But here is what I get for empty: Perhapes different types of functions are highlighted differently or maybe the editor doesn't know newer function or can't properly determine what a function looks like. header() is a function but is blue in both examples but exit() is green in both. They are both common functions so why is one green and the other blue? I suppose that there could be PHP version considerations taken into account and green is always compatable but you ned to check the PHP version for the blue. Personally, I have PHP Designer 2005 but I never use it. I still use an old version of CuteHTML which tries to highlight all my code like it was HTML. As a result, I never even notice the color of the text anymore. Old dog new tricks etc... I guess that my point is that while these syntax highlighters are helpful at times, they shouldn't be relied upon for critical applications. So the answer to your "dumb question" is that I really don't know so that makes us both "dumb" I guess! vujsa
  21. There is a great deal of customizable default features available in Joomla. The templates are about 90% HTML and the only essential PHP is pretty straight forward for most users. Additionally, there are numerous Joomla extension available including link indexes, forums, file uploads, and statistical information. My only suggestion for you is to install it and play with it for a while. I designed my own templates and have performed numerous tweaks to the source code without any trouble. See it in action: Handy PHP Hope this helps.
  22. Yeah, this process is still in effect from what I can tell. A feww accounts are transfered for the day, the server cleans up its configuration and reboots. This usually happens between 0000 GMT and 0500 GMT. Which is between 8:00PM EST and 1:00AM EST. But only lasts a short time. This seems to be currently effecting the server as I type! I don't think the outages will continue much longer. vujsa
  23. No, we do not offer secure server space here. That would require a dedicated IP address for that and that is outside the realm of free webhosting. Xisto - Web Hosting offers an account that I think would suit your needs for $3.50 US / month. I think you should have a look at their options and contact support if you have any questions. Xisto - Web Hosting is operated by the same corporation as this website. Good Luck, vujsa
  24. Well, I arrived here March 2005 after finding Xisto on a free website index, probably freewebspace.com. I was hoping to start a a reunion website for my friends around the World but it never really got going. I planned ahead and chose a domain name that I could use for several applications such as general discussion web forum. FORUM500.COM Nearly everyone active now has been there at least once! That is where the Free Web Hosting Application Script is located. The domain hasn't done anything, the index is just links to related places. The sub-directories and subforums are where the fun is. I have 2 addon domains here as well! VWONE.COM is a very slow to grow volkswagen website I work on from time to time but have a hard time really getting into for now. I need inspiration for that site but I sold my beetle more than 10 years ago. The other addon domain is HANDYPHP.COM which is my new website and is doing pretty well these days. It is a PHP helpsite and snippet repository. Much of the site is still in developement but to artificially stimulate the website, I have released a couple of extensions for Joomla which seem to be pretty popular. I wrote the first one for my website and decided to distribute it publicly. The second one isn't for my website but is similar in nature to the first and fills a larger need than the first one. I may develope a few more since they drive so much traffic to my site. The plan is and has always been to develope a successful website and promote it and host it here until I exceed the limitation of my account. Once I max out my Xisto account, I'll move to paid hosting. As long as everything goes to plan, , if I have maxed out this account, I should be able to generate enough traffic to pay for my hosting cost through advertising. Anyone interested in PHP may join my website either for help or to share knowledge. Other than that, I just sit back, maintain the forum, make a few posts and enjoy my fantastic hosting account! vujsa
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.