Jump to content

knowram

Members
  • Posts

    226
  • Joined

  • Last visited

Everything posted by knowram

  1. Sorry. At first I was getting a can not connect error. but now after changing some things I just don't get the right out put. here is the new code [code] <?php ################################################ # rWhois # inputs: IP address # outputs: array of rWhois info from first referral ################################################ function rwhois($query){     $fp = fsockopen ("www.arin.net", 80, $errno, $errstr, 30);     if (!$fp) {             $ret[] = "$errstr ($errno)\n";     }else{             fwrite ($fp, "$query\r\n\r\n");         $count=1;             while (!feof($fp) && $count < 17) {             $back = fgets ($fp,128);             $data = explode(":",$back);                 $ret[$data[1]] = $data[2];           $count++;           }//wend           fclose ($fp);     }//fi   return $ret; }//end function print_r(rwhois("64.58.79.230")); //yahoo [/code] and here is the out put that I get. Array ( [] => [//www.arin.net/index.shtml">here. ] => ) thanks for the help
  2. I found this chunk of code. but it is from 2000 and I have not been able to get it to work. dose anyone have any idea. [code] <?php ################################################ # rWhois # inputs: IP address # outputs: array of rWhois info from first referral ################################################ function rwhois($query){     $fp = fsockopen ("rwhois.arin.net", 4321, $errno, $errstr, 30);     if (!$fp) {             $ret[] = "$errstr ($errno)\n";     }else{             fputs ($fp, "$query\r\n\r\n");         $count=1;             while (!feof($fp) && $count < 17) {             $back = fgets ($fp,128);             $data = explode(":",$back);                 $ret[$data[1]] = $data[2];             $count++;             }//wend           fclose ($fp);     }//fi   return $ret; }//end function print_r(rwhois("64.58.79.230")); //yahoo ?> [/code] thanks for the help this would make life much easier for me if it will work
  3. So I have this cool trace route program where you can put in an ip address and it will show you the path taken to get to that ip and information about who owns that ip. My question is dose anyone know how this works and if it is possible to figure that information out with php or some other language? It would be extremely useful to be able to tell where the person using my site is located.
  4. Is there any way to figure out what the WAN ip address is of the computer being used to visit a site? thanks for the help
  5. I have installed a MySql server on my old lap top that I am using to host my family site. Now I am trying to set up a blog on the site. The MySql server seems to be running properly I can create and edit databases, and user with phpmyadmin. but when I try to run the blog installer any user that I have created is not recognized. Also if I just use the default admin user the installer can't find any databases that I have created. Anyone have any ideas? Thanks for the help
  6. In a moment of stupidity I put a password on my admin user on my MySql server. Now I can't get on to my phpadmin page or into it through the terminal. Not haveing done much through the terminal I don't even know how to add a password when you are trying to log in that way. Before I added the password all I had to do was type the path /usr/local/mysql/bin/mysql and press enter. Dose anyone know how to add the password to that? thanks allot
  7. ??? ??? Okay now I am having trouble with my simple test group of pages. Here is the code that I am using. [code] //Page 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>Untitled Page</title> </head> <body> <p> <form  method="post" action="test2.php"> <input type="text" name="drname" size="24" /> <input type="submit" name="Submit" value="Submit" /> </form> </p> </body> </html> //Page 2 <?php setcookie("drname", $drname); ?> <META HTTP-EQUIV=Refresh CONTENT=".3; URL=http:test3.php"> //Page 3 <?php echo $_COOKIE["drname"]; ?> [/code] Everything works great the first time through. But if I go back to the first page and try entering something different it dose not change the cookie. Is there something I need to add to make that happen? Also if I ever get this working I am going to want to set the cookie so that it never dies. How do I do that? thanks
  8. Okay now I am really confused. if I make 3 new pages with just that code you are right it works fine. But I still can't get it to work in the pages I need it to. Here is the entire code for the 3 pages. assume I typed jacob in the text box. [code] [color=yellow]//Page 1[/color] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>EMR Beta 1</title> </head> <body background="../images/BG.jpg"> <div align="center"> <table width="550" border="0" cellspacing="0" cellpadding="0" style="background-image: url(../images/full.jpg);"> <tr> <td valign="top"> <div align="center"> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <img src="../images/docin.gif" alt="" height="52" width="228" border="0" /><br /> <font size="-1" color="white">Use your full name as your would like it to appear on the final print<br /> And remember it is cap sensitive</font><font color="white"><br /> </font> <br /> <form action="diagnoses/choice.php" method="post"> <input type="text" name="drname" size="24" /> <input type="submit" name="Submit" value="Submit" /> </form> <br /> <br /> <br /> <font size="-1" color="white">Please do not include your appellation (Dr. NP. PA-C.).<br /> If this is your first time logging in this will be added on the following page.</font><br /> <br /> <br /> <br /> <br /> <br /> </div> </td> </tr> </table> </div> </body> </html> [color=yellow]//Page 2[/color] <?php setcookie("drname", $drname); echo $_COOKIE["drname"]; [color=yellow]//will print jacob[/color] ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>EMR Beta 1</title> </head> <body background="../../images/BG.jpg" text="white" link="white" vlink="white" alink="white"> <div align="center"> <?php //Conecting to database for buttons mysql_connect("localhost", "envision_knowram", "test") or die ("Could not connect to database"); mysql_select_db("envision_elcer") or die ("Could not select database"); $result=mysql_query("select * from medications WHERE Doc = '$drname'"); $row1=mysql_fetch_array($result); $result2=mysql_query("select * from instructions WHERE Doc = '$drname'"); $row2=mysql_fetch_array($result2); //looking for doctor if ($row1[0] != $drname and $row2[0] != $drname){ ?> <br /> <br /> <br /> <font size="+1" color="white">Could not find a anyone by that name.<br /></font> <font color="white">If this is your first time loging in please select a Practitioners Designation.</font><br /> <form method=post action="newdoc.php"> <input type="submit" name="Pos" value="Dr."> <input type="submit" name="Pos" value="PA-C"> <input type="submit" name="Pos" value="NP"> <input type="hidden" value="<?php echo $drname ?>" name="drname"> </form> If you have created an account already please try to login again<br /> <br /> <font size="+2" color="white"><a href="../Login.html">Login</a></font> <?php }else{   ?> <table width="550" border="0" cellspacing="0" cellpadding="0" style="background-image: url(../../images/full.jpg);"> <tr> <td align="center" valign="top"> <br /> <br /> <br /> <br /> <br /> <br /> <a href="../running1/Clear.php"><img src="../../images/start.gif" alt="" height="47" width="326" border="0" /></a><br /> [color=yellow]//link used to get to the next page[/color] <br /> <img src="../../images/or.gif" alt="" height="42" width="70" border="0" /><br /> <br /> <a href="editchoice.php?drname=<?= $drname?>"><img src="../../images/edit.gif" alt="" height="49" width="326" border="0" /></a><br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> </td> </tr> </table> </div> </body> </html> <?php } echo $_COOKIE["drname"]; [color=yellow]//will print jacob[/color] ?> [color=yellow]//Page 3 ../running1/Clear.php[/color] <?php echo $_COOKIE["drname"]; [color=yellow]//will not print jacob or anything[/color] ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Clear</title> </head> <body background="../../images/BG.jpg"> <?php mysql_connect("localhost", "envision_knowram", "test") or die ("Could not connect to database"); mysql_select_db("envision_elcer") or die ("Could not select database"); $query = "UPDATE `patients` SET `Diag1` = '' ,`Diag2`= '' ,`Meds1` = '' ,`Meds2`= '',`Ins1` = '' ,`Ins2`= '' WHERE `Ref` = '$drname'"; Mysql_query($query) or   die (mysql_error());     echo $_COOKIE["drname"]; ?> <p><META HTTP-EQUIV=Refresh CONTENT="1; URL=http:diagnoses.php"></p> </body> </html> [/code] sorry for all the code but from everything that I can see it should work something seems to be clearing the cookie some where. thanks again for the help
  9. Sorry guys once again all looks good but will not work here is the code once again. [code] //Page 1 <form action="diagnoses/choice.php" method="post"> <input type="text" name="drname" size="24" /> <input type="submit" name="Submit" value="Submit" /> </form> //Page 2 <?php if($_POST) { $drname = $_POST['drname']; setcookie("drname", $drname); } ?> //Page 3 <?php echo $_COOKIE["drname"]; ?> [/code] ???????
  10. Monkeymatt That looked like it would work however it still dose not seem to. Any other ideas?
  11. I have three pages. The first has a form on it with a text field. That gets submitted to the second page where I would like to set that submitted text as a cookie so that I can access that info on the third and following pages. If I do this where I set the variable on the same page as i use setcookie everything works fine [code] //Page 1 <?php $drname = "jacob"; setcookie("TestCookie", $drname); ?> //Page 2 <?php echo $_COOKIE["TestCookie"]; ?> [/code] but if i do this it will not work [code] //Page 1 <form> <input type="text" name="drname" size="24" /> <input type="submit" name="Submit" value="Submit" /> </form> //Page 2 setcookie("drname", $drname); //Page 3 echo $_COOKIE["drname"]; [/code] What am I missing Thanks for the help in advance.
  12. It looks like I am trying to do a similar thing. If you don’t mind me asking what ended up working for you?
  13. I  am trying to learn how to build a multi column dynamic list. At lest that is what I am going to call it. The apple widget browser is the only example that I have been able to find. Here is the link to check it out. http://www.apple.com/downloads/dashboard/ I am sorry if this is not a php question but the more I dig into trying to figure it out it seems like a combination of everything is needed to pull it off. Any information anyone can give me would be great. This has been my holy grail for months now.
  14. Do you think you would be able to point me to some information that would help me figure out how to do that? I have not been able to find anything myself. Thanks Allot
  15. I am trying to learn how to make a menu like apples widget menu. If you don't know what I am taking about take a look. http://www.apple.com/downloads/dashboard/ I am talking about the Widget Browser with 3 columns that helps you find a widget you are looking for. My first question is what is this kind of thing called. And if anyone knows of hand where I might be able to find info on how to create one for myself. Thanks
  16. Are there any good resources that describe how to make a web site compatible with a mobile phone browser? ??? Thanks for any input.
  17. So if that is the case. Am I right in assuming that the information that was posted is stored on the sites hosting server until it is retrieved in the next page? Is it stored there longer then that? Or is it stored somewhere else as well?
  18. I am setting up a site where security is a question. My question is if you have page with text boxes that you submit to the following page how is the information passed? Dose it travel to the server that is hosting the site and then back to the users computer, or just from one page to the next? Is there anyway that the information form the text boxes could be intersected by a third party? Any information on the topic will be appreciated. thanks
  19. here is an image of the problem that I am talking about. As far as I can tell this is only a proble with IE. - [attachment deleted by admin]
  20. The Validating page is cool that will help me allot thanks. However I am having trouble figuring out how to salve all the problems that it is coming up with. And I am still not sure what DOCTYPE I should be using. my site is a mix of html php and javascrip. her is my home page which is what I am starting with http://emr.envisionhealth.org thanks for any help mod edit to working URL
  21. Thanks that helped allot. Now I know what they are. But now I am not sure which one to use. My site is really simple consisting of tables, submit buttons, and php. I am guessing that I need to use one of the HTML 4.01 Strict, Transitional, Frameset DOCTYPES but I don't know which of the three to use.
  22. I know that it happens in IE and not in Safari but I am not sure about firefox for pc. And I don't have any examples that I can show the part of the site that is having this problem is password protected.
  23. i have taught myself web programing and it I am starting to realize that I have missed some of the standard things. I have been using Golive to do most of the non php work and when I upgraded last they added some things. Here is what it added. [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> [/code] Do you need that stuff and if so what is it? Also It has started putting <p></p> at the beginning and end of each line. What is that about? Thanks for any help
  24. I am using multiple submit buttons on my site and am finding that if the value of the button is to long IE dose strange things to the button. It will add blank space to the sides of the text and stretch the border. Is there anyway to keep IE from doing this?
  25. I am trying to create a back button on a form. would like to be able to send the variable $_REQUSET to the page that I am going back to. However I don't know what is used in that array to divide variables. so when I try to print it on the page that I am going back to all i get is  "ARRAY". here is the code that I am using the like is: [code] <a href="diagnoses.php?backinfo=<?=$_REQUEST?>">Back To Diagnoses</a> [/code] diagnoses.php being the previous page that I am trying to go back to. and the cod for on the diagnoses.php page to see if the info has been submitted and I can get to it is: [code] echo'<pre>'; print_r ($backinfo); echo '</pre>'; [/code] I have been able to submit arrays through links like this before but they have always been arrays that I have made so I have known how to split them up on the following page. dose this make any sense? If so have any ideas?
×
×
  • Create New...

Important Information

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.