Jump to content
xisto Community

jlhaslip

Members
  • Content Count

    6,070
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jlhaslip

  1. It might not like the whitespace and carriage return here: if ($action == construct){print "you haveTry this for the If statements: if ($action == construct) {print "you have
  2. you have : if ($stat[constructed] => 2) try: if ($stat[constructed] >= 2)
  3. My concern about this approach you suggest is that it has already been tried and defeated before. I refer to the Nazi Reich and the Soviet Union. Another issue is expressed in this Latin phrase: "?Quis custodiet ipsos custodes?". I'll let you research it by yourself.
  4. What you have currently: if ($stat[construction] <= 1){print 'Would you like to start the building';echo "<a href="construction.php?action=construct">construct</a> ";)And what you might need to change is the last end parenthesis to a right-curly brace. Like this: if ($stat[construction] <= 1){print 'Would you like to start the building';echo "<a href="construction.php?action=construct">construct</a> ";}
  5. Perfect attitude there, Fermy. We hope you can 'raise the standards' here, too.Tell us something about yourself. What interests do you have? A graphics beckground? Web design? Lots of information on both of those topics around here.
  6. Yes, me too. I am familiar with Databases, and all that, but there are places where they may not be available. For instance, my ISP gives me a space with a private URL, but no access to Database services, so I am trying to develop a small site which does not require them. Funny how they will allow php, but no databases? The two go hand in hand for so many uses... also, why use a database for seven entries to setup a menu?
  7. Before I present the alternative solution, I want to thank Truefusion for his efforts in assisting with this problem. That's what this Community is all about. Learning stuff and helping others to learn. Thanks, again. Perhaps I wasn't too clear about the purpose of the data checking in this script, but what I expected from the original code was an array built from the third column in the data file (array element [2]) which has all the 'valid query string' results, from building the menu from the same data, so if someone messed with the query string, the Index page would be produced instead. Essentially, create a list of 'valid' results for the query string. As stated above, I had it working quite well on m machine, but for some reason, it would fail on the Xisto server. So, I reduced all the Logic checks to check against an array which I had manually built and added to the file system. It now works great (again). Only downside is that any new menu items must be added to the array by hand, which on a small site is okay, but on a large site, or one which is dynamically created, is a concern. I'm no tfinished with this yet. I will come up with a better answer, but for now, here is the fix: Data Array: create an array of acceptable query string values like this: I have it contained in an seperate file so the user doesn't have to change the code in the script file, but it could also be placed directly in the script, too. Depends on whether the user is savvy enough to alter the array contents without messing something up. If the Array is outside the script, only the data file gets whacked, not the scripting. Contents of sample data array file: <?php$data_array = array('index', 'one', 'two', 'three', 'four', 'five', 'contact');?> And here is the new logic portion of the script: all it does is check against the array values as contained in the array listed above. So now I'll come up with a method to update the array based on the contents of the menu_data_element[2] and it will all be good again. $submit = $_GET ; echo $_GET ; if( !isset($_GET ) ) { if (file_exists($data_array[0] . '.txt' )) { include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); } } elseif (in_array($submit , $data_array)) { if (file_exists($submit . '.txt' )) { include ( $submit . '.txt' ); } else { include ('index.txt'); } } else { if (file_exists($data_array[0] . '.txt' )) { include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); } } ?> linenums:0'><?phpinclude( 'menu_array.php' ) ;$submit = $_GET ;echo $_GET ;if( !isset($_GET ) ) { if (file_exists($data_array[0] . '.txt' )) { include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); } } elseif (in_array($submit , $data_array)) { if (file_exists($submit . '.txt' )) { include ( $submit . '.txt' ); } else { include ('index.txt'); } } else { if (file_exists($data_array[0] . '.txt' )) { include ( $data_array[0] . '.txt' ); } else { include ('index.txt'); } }?> Thanks agian to Truefusion and the others who had a look at this problem.
  8. Yes, good answer there. Check out Hotscripts.com for a good list of scripts. I also had a phpmychat going and it worked nicely, too, but the part about Bandwidth was a concern until I raising my Hosting to Level 2. Now I don't use it, and it doesn't matter.Also, there may be a chat using Ajax around. It is client-side stuff, so the page refresh and bandwidth issues wouldn't be as large a concern. Good luck finding what you need. Let us know if you are successful.
  9. I was born and raised on the Great Lakes. Never lived more than about 1 mile from a Beach until I went away to University. Always swam nearly everyday. Sometimes for hours and loved it. Had our favourite spots and bult our own diving Boards and would stay there all day. Then school and work happened. Haven't swam except in a pool for years. Pool swimming just isn't the same.
  10. Something else which might help is to rename the original index.html which is placed there on account set-up to another name before upoading the new one. Or be certain to select the 'overwrite existing files' feature before uploading the new files.
  11. I am not aware of any circumstances where a particular Browser is not able to access a site unless the site (you) specificly deny access through scripts and such. It seems really quite odd that FF would be able to view your site, but not IE.I am using NN7.2 on an Imac and here is the info from the last posting: 3-29-2006 at 08:09 PMby Abigayle Burroughs . Wishing you the best figuring this one out.
  12. What script? Some things like to be in a folder on the first level below the public_html. Like public_html/forum.
  13. Here, try this data, it is the actual file I have for testing. The good stuff is in the third column. Those are the query strings chunks I want to validate against. array element number 2. Only if it has the '?page=' as part of the string.
  14. Was that on your local machine or at the Trap server?The data gets read from a file (menu_data.txt) that is already defined and includes the information to build the page menu. The third entry in every line of that file is something like '?page=one' which builds the query string. The purpose of the script we are looking at here is to read that same file and pull out the list of acceptable query strings. If the user doesn't mess with the queery string, I agree that there should be no need for the security check, but in light of the fact that the real world exists, I am trying to re-use the data in the same format as it is presently available and perform this check against the data. It is not that it won't work, because it does on my machine. The problem is that it won't work at the Xisto server and if I knew why that was so, I could correct for the differences, but I just do not understand why it works locally on my machine and not up there.
  15. No success. Same problem. Created an array when using the URL with no Query String, and created an empty array with the Query string included in the URL. Only difference was that the length of the array using the for loop was about 12 times longer, but it only was produced on the original pass. Even though it had 85 elements to check, it coudn't find the correct page to include.
  16. Well, it might, haven't tried it yet. Just to explain that code that you commented out is the critical part of the code. It checks a list of csv data which was used to build the Menu and grabs the contents of the third data item in the array and places it in what should become an array full of unique contents so that a query string matches the list of valid results. If the submitted query string is not valid against the array elements, then ignore the query string and use the index.txt as the include. It is a security check so that users can't mess with the query string and enter a query string which is for either a file you don't want them to have access to or which will allow them to call a file which doesn't exist and produce an error. So I'm off to try that code you entered and I'll let you know the results.
  17. Drop this 'Catch Phrase' from the site. Someone who considers themselves 'professional' would view this as an insult.
  18. How did you search? on the Internet? it usually takes a couple of days for the Information to propagate on the web.As for 'managing' your 'domain' to add ftp users are you referring to adding ftp users to your 'account'? That is done though the cpanel for the account. The sign-up email will have information on how to access the cpanel, then select FTP Manager, (which is different than File Manager).Hope this helps. Post back here if you need some more help.
  19. Empty your cache and delete temp internet files. This works most of the time. Let us know if it doesn't work, because there are other things to try, but usually this will do it.Just had a look at the site and the default Index.html page is still there. When you use the file manager to upload, be certain to place the files in the public_html folder, not the first one you get to on the account, otherwise, they will not be available from the web. To move to the public_html folder, click on the gif to the left of the title 'public_html'. If you click on the title, you will be able to perorm actions against the folder like rename or delete, but to migrate to the right place to insert the files, click on the gif beside it, then select to upload by selecting the title beside the large up-arrow. Hope this helps.
  20. Failed to read the rules. Not enough posts, I'm afraid.Closing Topic.
  21. Here is the code: <?php $data_array = array(); $data_array2 = array();$file_name = "menu_data.txt";$handle = @fopen($file_name, "r");if (!$handle) { echo "File Handle Not Available For Use"; exit; }while (($data = fgetcsv( $handle, 1000, ",")) !== FALSE) { if ( (strpos ($data[2],"$page="))) { $data_array[] = trim(substr($data[2], 6) ); } }fclose($handle);$data_array2 = array_unique( $data_array );$submit = $_GET ;if( !isset($_GET ) || ($_GET == "" ) ) { if (file_exists($data_array2[0] . '.txt' )) { include ( $data_array2[0] . '.txt' ); } else { include ('index.txt'); } } elseif (in_array($submit , $data_array2)) { if (file_exists($submit . '.txt' )) { include ( $submit . '.txt' ); } else { include ('index.txt'); } } else { if (file_exists($data_array2[0] . '.txt' )) { include ( $data_array2[0] . '.txt' ); } else { include ('index.txt'); } }?>As per the description above, this snippet works fine in the XAMPP setup on my local machine. ( Windows 98, php ver 5, safe mode off) However, when I upload it to the Xisto server, it never finds a valid page to 'include'. It always drops through the logic and reloads the Index page. I have tried to 'trim()' the various bits of data, I have used var_dump() to look at the data, I have written a script that outputs the array being tested and all methods 'appear' to provide what should be 'good' data for the query string to test against, but when I run the index.php main page script from this URL, I can never get off the Index page. Just wondering if anyone else can find the flaw in the Logic ( can't be a Logic flaw, because of the way it works in my machine) or the code (ditto) that would make a difference. I believe Xisto has php 4.4.1 installed and I suspect safe-mode is 'on'. I will do a php-info to confirm this. *edit* nope, safe mode appears to be off on the Xisto server.*edit* Thanks for having a look and I hope someone nails this for me, because I have tried everything imaginable to force it to do a correct comparison. Thanks again. *edit to add this following bit of information which might be useful* When I run the script with echo statements to confirm the output of the arrays and the in the page selection, here is a sample of the output for all query strings on my machine and on the Xisto server only when the '?page=' query string is absent. array(7) { [0]=> string(5) "index" [1]=> string(3) "one" [2]=> string(3) "two" [3]=> string(5) "three" [4]=> string(4) "four" [5]=> string(4) "five" [6]=> string(7) "contact" } data_array:array(7) { [0]=> string(5) "index" [1]=> string(3) "one" [2]=> string(3) "two" [3]=> string(5) "three" [4]=> string(4) "four" [5]=> string(4) "five" [6]=> string(7) "contact" } data_array2:get_page:submit: On my machine, when the query string is complete, of course the get_page and submit values compare favourably to the contents of the query string and the correct page is fetched for the browser. On the Xisto server, here is a sample of the same results when the query string is other than empty: array(0) { } data_array:array(0) { } data_array2:get_page:twosubmit:two As you can see, I was requesting ?page=two, but the array results are empty and the index page displayed instead. As noted above, the arrays are full of correct information on my machine and when the Xisto server is fetching the basic index.php only. So that explains what is happening, but not why and how to resolve this problem. Any help or direction would be very appreciated. Thanks.
  22. To find the ways to make a 'bot', use Google. (Google is your friend) I have seen instructions on php programming sites, BUT, they can be quite resource heavy, so I wouldn't use them on a Shared Server such as the Xisto Hosting. They are also prone to having lots of errors, so they can't be depended upon. This is something best left to professional coders. An amatuer Bot will be trouble waiting to happen.As for other methods to getting the available information off the increasing number of Web Locations and indexing them into a Searchable Database, I would think that if you discover a new method, Google would love to hear about it. Good luck in your search.
  23. Go to the top of every page where the Shoutbox is displayed and click on the link titled 'bbcodes' then scroll down a couple of pages.
  24. The Canadian Football League and the National Hockey League have wage caps (ceilings) in effect for the same reason. Players were 'over-priced' and the Clubs were losing money, in spite of the lucrative TV deals, so the wage ceiling was imposed. And doesn't Pro Basketball have the same thing? Expect to see them some time soon in a Sports Arena near you.
×
×
  • 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.