Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. just try running the query in the mysql and see if u can get any results. if not then use the code which has been given by thrope
  2. u have to modify the code like this $browser=getBrowser(); if (($browser=='ie')||($browser=='firefox')) { header( 'Location: http://www.google.com' ) ; } elseif (($browser=='safari')||($browser=='chrome') { header( 'Location: http://www.yahoo.com' ) ; } else { header('Location: http://www.rediff.com'); }
  3. i think the error is in the query $sql = mysql_query("SELECT imgpath, imgpath2, imgpath3, imgpath4, imgpath5, thumb_1, thumb_2, thumb_3, thumb_4, thumb_5 FROM member_pictures WHERE thumb_1 = " . $_SESSION['picposted'] . ""); try running the query in the mysql and see what result u get by the way wht is the $_SESSION['picposted'] value
  4. sorry i too didnt got it so do mean that without if condition mysql_fetch_array() doesnot work
  5. u can use the ||(or) parameter which will redirect to the respective ones. $browser=getBrowser(); if (($browser=='ie')||($browser=='firefox')) header( 'Location: http://www.google.com' ) ; else header( 'Location: http://www.yahoo.com' ) ; like this u can do it out
  6. u try this code <?php require_once "Mail.php"; $from = "Chaitu <drvirusindia@gmail.com>"; $to = "Chaitu <drvirusindia@gmail.com>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "ssl://mail.example.com"; $port = "465"; $username = "smtp_username"; $password = "smtp_password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> and change the hostname,port,username and password..provided u have PEAR installed in the machine
  7. change this <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(1)"><img src="<?php echo "$row['thumb_2']"; ?>" width="90" height="80" name="pimage1" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(2)"><img src="<?php echo "$row['thumb_3']"; ?>" width="90" height="80" name="pimage2" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(3)"><img src="<?php echo "$row['thumb_4']"; ?>" width="90" height="80" name="pimage3" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(4)"><img src="<?php echo "$row['thumb_5']"; ?>" width="90" height="80" name="pimage4" border=0></a> </div> </td> </tr> </table> like <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(1)"><img src="<?php echo $row['thumb_2']; ?>" width="90" height="80" name="pimage1" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(2)"><img src="<?php echo $row['thumb_3']; ?>" width="90" height="80" name="pimage2" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(3)"><img src="<?php echo $row['thumb_4']; ?>" width="90" height="80" name="pimage3" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(4)"><img src="<?php echo $row['thumb_5']; ?>" width="90" height="80" name="pimage4" border=0></a> </div> </td> </tr> </table>
  8. i think in this one u have an error <div align="center"><img src="<?php echo "$row['imgpath']"; ?>" align="middle" border="0" width="380 height="225" name="large"></div> <div align="center"> <a onmouseover="javascript:image_click(0)"><img src="<?php echo "$row['thumb_1']"; ?>" width="90" height="80" name="pimage0" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(1)"><img src="<?php echo "$row['thumb_2']"; ?>" width="90" height="80" name="pimage1" border=0></a> </div> .....................and so on remove the "" after echo.. like this <div align="center"><img src="<?php echo $row['imgpath']; ?>" align="middle" border="0" width="380 height="225" name="large"></div> <div align="center"> <a onmouseover="javascript:image_click(0)"><img src="<?php echo $row['thumb_1']; ?>" width="90" height="80" name="pimage0" border=0></a> </div> </td> <td bordercolor="#FFFFFF"> <div align="center"> <a onmouseover="javascript:image_click(1)"><img src="<?php echo $row['thumb_2']; ?>" width="90" height="80" name="pimage1" border=0></a> </div> .....................and so on
  9. u can use the cookies to store the values and then delete them once u show them up..
  10. Now, that IS syntactically incorrect. i know that it is wrong, as he doesnot gave more info..
  11. try using it like this <script language="JavaScript"> image0.src ="<?php echo "$row['imgpath']"; ?>" </script
  12. check in ur tables whether u have duplicate pass key values. as ur checking the count==1 i think there might be a chance of duplicate values.
  13. so if i understood correctly is this the captcha code u are using?
  14. it is not with the email validation as i guess it is with the confirmation code(captcha). just paste the entire code, then we might help u out use the code tags
  15. can u paste ur code so that it would be more understandable..
  16. yes as oni-kun said the example will not work in the firefox. it wil only do in the ie
  17. hi u can do it out using the javascript. PHP will not work as it is not a client side programming and u need to capture the keystrokes and then use them up.. just check this javascript that i have found out. might be it will help u out..
  18. hi i wrote a code long back about this port scanning. just go through it. timer.php <html> <title>Check the Open ports</title> <pre> <font size=3><b>Hai Using this application u can check the ports that are opened in the ip address. If no port is mentioned it will check for the default ports.. <a href="http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers" target="_blank">For list of TCP/UDP ports</a> Common Ports Used are FTP 21 SSH 22 Telnet 23 SMTP 25 Web 80 Pop 3 110 IMAP 143 Other Applications Remote Desktop 3389 PC Anywhere 5631</b></font> </pre> <body background="2.png" bgproperties="fixed"> <form action="timer.php" method="POST"> <br><br><br> <table align="center" border="1" bordercolor="black"> <tr> <td align="left" bgcolor="transparent" valign="center">Ip address:<input type=text style="color: #FF0000;font-family: Verdana;font-weight: bold;font-size: 14px;background-color: transparent;" maxlength='30' name=address></td></tr><tr></tr> <tr><td align="left" bgcolor="transparent" valign="center">Port Number:<input type=text style="color: #FF0000;font-family: Verdana;font-weight: bold;font-size: 14px;background-color: transparent;" maxlength='25' name=service></td></tr> <tr><td align="center" valign="center"><input type=submit name=submit value=Submit></td> </tr> </table> </form> </body> </html> <?php error_reporting(0); $address = $_POST['address']; $service = $_POST['service']; if($address && $service) { if(fsockopen($address,$service,$errno,$errstr,10)) { //echo "$address:$service is up!"; echo ("<table><td bgcolor=green width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is up!</b></font></td></table>"); } else { //echo "$address:$service is NOT up!"; echo ("<table><td bgcolor=red width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is Down!</b></font></td></table>"); } } elseif($address) { include("scanner.class.php"); /* get the target ip address */ $ip_address = gethostbyname("$address"); error_reporting(off); /* set all the require atributes */ $my_scanner = new PortScanner($ip_address,$ip_address); $my_scanner->set_ports("15-25,80,110,143,3306,3389,5631,1337,666"); $my_scanner->set_delay(1); $my_scanner->set_wait(2); /* do the scan and capture the results */ $results = $my_scanner->do_scan(); /* display the results - this simply loops through the ip addresses and indents the results */ foreach($results as $ip=>$ip_results) { echo gethostbyaddr($ip)."\n<blockquote>\n"; foreach($ip_results as $port=>$port_results) { echo "\t".$port." : ".$port_results['pname']." : "; if ($port_results['status']==1) { //echo "open"; echo ("<table><td bgcolor=Green width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>Open</b></font></td></table>"); } else { //echo "closed"; echo ("<table><td bgcolor=Red width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>Closed</b></font></td></table>"); } echo "<br>\n"; } echo "</blockquote>\n\n"; } } else { } ?> scanner.class.php <? /******************************************************************************* * Copyright 2002 - Adrian Ritchie :: GrinGod Productions :: aidy@gringod.com * * This software is being release by Adrian Ritchie for educational purposes. * Whilst it may be re-used by other parties, the copy-right remains with * Adrian Ritchie. Should this code be re-used either whole or in part, this * agreement should be attached. * * Dislaimer: * This software is for educational / private network use only. Do with it * what you may, but on your own head be it! *******************************************************************************/ class PortScanner { var $start_ip; /* start of the ip range to scan */ var $stop_ip; /* end of the ip range to scan */ var $current_ip; /* current ip address being scanned (this is for future features) */ var $ports; /* array of ports to be scanned */ var $wait; /* how long to wait for a response from the port */ var $delay; /* how long to pause between each port */ /*** * Function PortScanner() * Class constructor. * Sets the start and end address of the scan range * must be passed... but may be the same. * The end address must be greater than the start address. ***/ function PortScanner($start, $stop) { $this->start_ip = ip2long($start); /* store the start ip address as a long number */ $this->stop_ip = ip2long($stop); /* store the end ip address as a long number */ } /*** * Function set_ports * Adds the passed ports to the array of ports to be scanned. * This can either be a single port, a range of ports e.g. 1-90 * a a combination of both separated by commas (no spaces). ***/ function set_ports($ports) { /* Explode ports into an array based on comma seperation. Will create an array even if there is no comma so no need to check for an array in following code */ $ports_array = explode(",",$ports); /* loop through array of ports */ foreach($ports_array as $key=>$val) { /* try to explode port range into an array */ if(ereg("([0-9]+)\-([0-9]+)",$val, $buff)) { /* loop through range to add each port */ for($ii=$buff[1]; $ii<=$buff[2]; $ii++) { $this->ports[] = $ii; } } else { /* only one port was sent so add that */ $this->ports[] = $val; } } } /*** * Function set_wait * Sets the time to wait for response from socket. * Good object-oriented design doesn't allow access to class * attributes, so accessor functions are provided. ***/ function set_wait($wait) { $this->wait = $wait; } /*** * Function set_delay * Sets the delay between each port check. Delay is in micro-seconds. * Good object-oriented design doesn't allow access to class * attributes, so accessor functions are provided. ***/ function set_delay($seconds=0, $microseconds=0) { $this->delay = (1000000*$seconds) + $microseconds; } /*** * Function do_scan * Does the actual scan, based on the given details (see above functions). ***/ function do_scan() { /* Loop through ip addresses. This is why ip addresses are stored as long numbers as apposed to Internet Protocol dotted addresses */ for($this->current_ip=$this->start_ip; $this->current_ip<=$this->stop_ip; $this->current_ip++) { /* convert the long number back to a dotted address */ $ip = long2ip($this->current_ip); /* loop through the ports and check each */ foreach($this->ports as $key=>$port) { /* for unix systems, this will obtain the name of the service running on that port. Win32 systems will just return N/A. */ if (!getservbyport($port,"tcp")) {$pname = "N/A"; } else {$pname = getservbyport($port,"tcp"); } /* attempt to open a socket to the port at the current ip address */ $ptcp = fsockopen($ip, $port, &$errno, &$errstr, $this->wait); if($ptcp) {$status=1; } /* return 1 for open port (so users can display their own message */ else {$status=0; } /* return 0 for closed port (so users can display their own message */ /* return the results in a structured multi-dimensioned array so the user can choose how to display the results */ $results["$ip"]["$port"]["pname"] = "$pname"; $results["$ip"]["$port"]["status"] = "$status"; /* start the delay before moving on to the next port */ $this->do_delay($this->delay); } } /* returnt the results to the user */ Return $results; } /*** * Function do_delay * This pauses execution for the passed length of time (micro-seconds) * This allows a delay of less than 1 second for system which do not * support usleep (Win32). * This code was post on the PHP manual by "dsc at c2i dot net" * I'm not sure if this works or not, so if your running *nix you * may want to change this to use usleep(); ***/ function do_delay($delay) { $start = gettimeofday(); do { $stop = gettimeofday(); $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + $stop['usec'] - $start['usec']; } while ($timePassed < $delay); } } ?> i think these might help you out.
  19. change this line ('{$_POST['servername']}','{$_POST['serverip']}', '{$_POST['port']}', '{$_POST['sdetails']}','{$_POST['details']}, '{$_POST['serverowner']}', '{$_POST['deob']}','{$_POST['password']}')") like this ('{$_POST['servername']}','{$_POST['serverip']}', '{$_POST['port']}', '{$_POST['sdetails']}','{$_POST['details']}', '{$_POST['serverowner']}', '{$_POST['deob']}','{$_POST['password']}')") u forgot to close the inverted tags after the details..
  20. u have alter the table structure not the query..
  21. hi u are using as if the submit button is pressed u are selecting the connection and selecting the db after that u closed it and started running commands, obviously it will not show u any error as it has connected to the mysql and selected the db after that it cannot understand ur query $fieldavail = mysql_list_fields("sch", "avail", $db); so check ur code again
  22. u cannot have a space in the field names of a table sname, serverip, sport, sdetail, details, server owner, Deob, password in this server owner is wrong change it to server_owner
  23. have u tried to echo the value of $sql..and running it in the mysql to se if u are getting values correctly..
  24. then no other solution use the ft2.php as i already told in which u can restrict access for uploading of the files just go through the documentation http://www.solitude.dk/filethingie/
×
×
  • 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.