Jump to content

dcole.ath.cx

Members
  • Content Count

    430
  • Joined

  • Last visited

Everything posted by dcole.ath.cx

  1. FINE, were take the easy way out... I was trying to have fun! <?php$path_parts = pathinfo('/www/htdocs/index.html');print $path_parts['extension'];?> if you need more than the ending like: path?arg=value#anchorthen I would go with parse_url ( string url )this will output:Array( [scheme] => http [host] => hostname [user] => username [pass] => password [path] => /path [query] => arg=value [fragment] => anchor)but if you need from the dot on, you will have to break it at the . (dot) and take the $var[1]
  2. well what you can do is open the file the username are kept in with fopen.put that into a stringthen take the string and break it into an array.break it again if the file has anything more than just user names.then run an if statement (if(x=0, x < $filesize, X++))then inside that compair username to the array you broke down... $username ==$array[$x]and if that's true, then you don't want that used again! Then display something like "Username is taken" $file = fopen("list.txt", "r");$filesize = filesize("list.txt");$text = fread($file, $filesize);fclose($file);$explodedtext = explode("\n",
  3. dcole.ath.cx

    variables in URL?

    that didn't work out and I can't edit it... ummm http://subdomain.domain.toplvldomain/folder/file.php?var=value&var2=value2
  4. dcole.ath.cx

    variables in URL?

    If someone else would need this info you do it like this: [url=http://subdomain.domain.toplvldomain/folder/file.php?var=value&var2=value2]http://subdomain.domain.toplvldomain/folde...lue&var2=value2[/url]
  5. well I was working on my server and my friend was hacking and I learned that FireFox is all browsers, so now nothing can be better than FireFox... In FF can't do it, you can just have FF be IE or any other browser.
  6. nvm, I was try to take the hard way out and ask but I've done it once, so nevermind... long term memory loss!
  7. get the URL or the address then take the last 4 charactorslike this:$file = "/folder/file.txt";$extension = substr($file, strlen($file) - 4);$extension will be .txt(with jpeg you will not have the dot)
  8. How would you go about searching and replacing something like this:I want to see if there is 123 in a file,if it is, I want to replace it with 123456but if there is 123456 I don't want it to add another 456 to it! (I don't want 123456456)What sould I do?------How about searching for 123, then taking the part I found and adding the parts around it , then search for 123456 and if that's there move on! Other wise replace 123 with 123456.so when it finds 123 it will take 123 and 3 charactors after it, then search for 123456Does this sound good?
  9. I have a message board where you can sign your name and leave a message, then I added a advanced sign that takes longer to load so I left it on another page.Is there a way so users fill out there name and message, then decide to go to the advanced post, it brings the data with it, but still have the Post button that would post the form.
  10. Getting a browser is like getting a car. Some people just go from A to B and would care less about life. But others have to have one of a kind car...FireFox should become more popular. With it you can change anything! I like to know the wether when I come online, so I just look at the top of my screen.. With IE I had to go to google, look up the URL I could never remember, click though links, wait for pages to load... (My Bookmarks or Favorites it to messy to look around in)With FF, I open a window and look in the lower left to see if I have mail... in IE I had to go to hotmail or gmail, login
  11. More on colors:1) Keep your colors dark on light. It is easy for people to read when you have for example a white background and a dark text.2) I hear alot about having a plan background, like 1 solid color... fancy background make it hard to read text.3) People view things by color. They will look at the brightest thing first!! This means your headings should be a different color, and the same for links. When there done reading, visitors will want to move on and you want them to see your links. (My website has a white background with black text and dark red for link, and headings.)Layout:1) K
  12. YES,body tag <body> is used to define stuff on a page<html><body></body><head></head></html><tbody> is used in a table and only in that tableIt help to define were the body of your page is (like body of a report)
  13. I figered it out... nvm!
  14. So...I have a script that looks like this:$var = "blah";PHP(HTML(JavaScript(HTML($var))))I need " " or \" \" or ' ' or \' \' around where each ( ) is.but it needs to be in the correct order! What is that order??? If it is in the wrong order you will get things like this:source: <img src=\' \="" file : <img src=\' $filePath \' source: width="\'20\'"file : width=\'20\'ALSO These errors are not because of " ' " ' ... or " \" " \" ...
  15. I have a file that looks something like this:ghi |789 | &*(abc | 123 | !@#def | 456 | $%^ghi |789 | &*(I then open the file and read it into a string.Then I break the string into an array (break it by line (\n) and by [space]|[space] )Then I search the 1st and 2nd set of data (abc, def, ghi) and (123, 456, 789)Then once that is found, I replace the data (Example replace 456 with 654)So then the data is replace and I have to write it back into the file...I write the replaced file back into the lineThen writes the lines back into a long stringlike this: abc | 123 | !@# \n def | 654 | $%^
  16. could be something wrong with php.iniI once left a space (sendmail_from= username@domain.com) and it wouldn't work.. I never though of looking in the php.ini for the error until I sent php.ini to a friend because he needed a copy. If it's not in php.ini, it's in process.phpThis is an example of mine: <?php// Get data from form $name = $_POST['name'];$website = $_POST['website'];$email = $_POST['email'];$comment = $_POST['comment'];$to = "username@domain.com";$subject = $_POST['subject'];// get the data ready to send$premessage = "$name \n $email \n $website \n $comment";$message = wordwrap
  17. To get something from a form, you set the location of the form to goto the php file. Then use $var = $_POST['NAME']; in the php file to get the info from the formNAME being the name of a field in your form.EX: <input type='password' name='NAME' />
  18. I made my own server and my website is on it. I can create other sites by hand but I want PHP to do itand someone give me an example of iis_add_server()int iis_add_server ( string path, string comment, string server_ip, int port, string host_name, int rights, int start_server )what is int?what is string comment?what is string host_name?how do I write int rights,what do I put for int start_server? just 1 or "1"...Thanks
  19. Here is a script that display images that are located in a folder. <html><head><title>Photos</title></head><body><div style='text-align:center;'><h1>Photos</h1></div><?php$photoDir = "/";$dir = opendir($photoDir);$fileList = null;$fileNo = 0;while(false != ($file = readdir($dir))){ if(($file != ".") and ($file != "..")) { if((strtolower(substr($file, -4)) == ".png") or (strtolower(substr($file, -4)) == ".jpg") or (strtolower(substr($file, -4)) == ".JPG") or (strtolower(substr($file, -4)) == ".bmp") or (strtolower(substr($file, -4)
  20. Can Somesone look over my code, it has errors and I can't find them. I think it has something to do with read dir <?php$file = fopen("C:/list.txt", "r");$filesize = filesize("C:/list.txt");$etext = fread($file, $filesize);fclose($file);$etext = explode("\n", $etext);for($i = 0; $i < sizeof($etext); $i ++){ $dir = opendir("$etext[$i]"); while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..")) { if(is_dir("$etext[$i]/$file")) { $file3 = fopen("C:/list.txt", "r"); $filesize = filesize("C:/list.txt"); $ltext = fread($file3, $filesize); fclose($file3
  21. How do I display code (so it is not understood as html)so I can write <h1>like this</h1> so the code shows...but XMP was replaced with PRE but dooesn't show code... so I don't want to use XMP.also I don't want a textbox where I have scroll bars or have to assign a hight and width!
  22. dcole.ath.cx

    Custom font

    you could use flash...
  23. dcole.ath.cx

    hit test

    How do I do a hit test with an object and a wall. If the wall is added by action script.MAIN speed = 3;stageHeight = 400;stageWidth = 400;tunnelHeight = 200;points = 5;startPoint = {x1:0, y1:30, x2:0, y2:170};z = 1;function addSection() {attachMovie("tunnel1", "tunnel"+"_"+z, ++d);z++;if (z>2) {z = 1;}}addSection();OBJECT onClipEvent (load) {gravity = 6;force = 12;}onClipEvent (enterFrame) {setProperty ("", _y, _y+gravity);if (mousedown == 1) {setProperty ("", _y, _y-force);}}onClipEvent (mouseDown) {mousedown = 1;}onClipEvent (mouseUp) {mousedown = 0;}onClipEvent (enterFrame) {if (_root.ci
  24. mysql_query ( string query [, resource link_identifier] );you should at least have ); at the endadd " " or ' ' if it isn't a var.
  25. How about a tutorial on DNSHow do big comanys get domains? How would I become a hosting company?How does DNS work?...This may sound like a personal question but I have heard it from alot of people. We know it ends with a visitor's browers but where does it begin?
×
×
  • Create New...