Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. is it $monday_time1 != 'k' or $monday_time1 != '$k'
  2. hai i have done this long back i think u can use this one <html> <body> <style> body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:90%; margin:150px; color:green; } .fieldset { width:10px; } .fieldset .nobr { display:none; } .fieldset .textfield { margin:3px; height:20px; width:200px; border:solid 0 #fff; } .fieldset .textarea { margin:3px; height:165px; width:200px; } </style> <form action="feedback.php" method="post"> <?php $ipi = getenv("REMOTE_ADDR"); $httprefi = getenv ("HTTP_REFERER"); $httpagenti = getenv ("HTTP_USER_AGENT"); ?> <input type="hidden" name="ip" value="<?php echo $ipi ?>" /> <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" /> <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" /> <fieldset align="middle"> <legend align="center">Feedback form </legend> <label for="name" style="color: green; font-family: Verdana;font-weight: bold;font-size: 14px;" maxlength='25'">Name:</label><br/> <input type="text" id="nameis" name="nameis" align="middle" /> <br /> <label for="email" style="color: green; font-family: Verdana;font-weight: bold;font-size: 14px;" maxlength='25'">Email:</label><br/> <input type="text" id="visitormail" name="visitormail" /><br/> <label for="website" style="color: green; font-family: Verdana;font-weight: bold;font-size: 14px;" maxlength='25'">Website:</label><br/> <input type="text" id="website" name="website" /> <br /> <label for="comment" style="color: green; font-family: Verdana;font-weight: bold;font-size: 14px;" maxlength='25'">Comment:</label><br /> <textarea cols="30" rows="15" name="feedback" id="feedback" > </textarea> <br /><td>Security code: <input class="text" name="secCode" type="text" size="10" /></td> <td><img src="securityCode.php" alt="security code" border="1" /></td> <label for="submit"> </label><br /> <input id="submit" name="submit" type="submit" value="submit" /> </fieldset> </form> </body> </html> <!--<?php echo "<br>12".$ipi."<br>34".$httprefi."<br>11".$httpagenti; ?>--> <?php $ip = $_POST['ip']; $httpagent = $_POST['httpagent']; $nameis = $_POST['nameis']; $visitormail = $_POST['visitormail']; $feedback = $_POST['feedback']; $feedback = stripcslashes($feedback); $todayis = date("l, F j, Y, g:i a") ; $website = $_POST['website']; // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: dr.virus.india@gmail.com' . "\r\n"; //$headers .= 'From: xxxxxxxxxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "About the site"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:green;font-color:white;font-weight:strong;"> <td colspan="2">Feedback</td> </tr> <tr style="background:#F8F8F8"> <td>Date</td> <td>$todayis</td> </tr> <tr style="background:#F8F8F8"> <td>Http Agent</td> <td>$httpagent</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:green;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Name</td> <td>$nameis</td> </tr> <tr style="background:#EFEFEF"> <td>EMail</td> <td>$visitormail</td> </tr> <tr style="background:#F8F8F8"> <td>Website</td> <td>$website</td> </tr> <tr style="background:#F8F8F8"> <td>Feedback</td> <td>$feedback</td> </tr> </table> EOF; //echo $message; if(isset($_POST[submit])) { $secCode = isset($_POST['secCode']) ? strtolower($_POST['secCode']) : ""; if($nameis && $visitormail && $feedback ) { //echo $message; if (eregi('http:', $feedback)) { die ("Do NOT try that! ! "); } elseif((!$visitormail == "") && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { //echo "<h2>Enter valid e-mail</h2>\n"; $tellem = "Please enter a Valid Email ID\n"; echo $tellem; } elseif(empty($nameis) || empty($feedback) || empty($visitormail)) { echo "Please fill in all fields\n"; } elseif(($secCode != $_SESSION['securityCode'])) { //echo "<br>1".$secCode; //echo "<br>2".$_SESSION['securityCode']; echo " Please enter the Security Code Correctly"; unset($_SESSION['securityCode']); } elseif(mail("dr.virus.india@gmail.com", $subject, $message, $headers, "-f".$visitormail)) { echo "Feedback sent succesfully"; unset($_SESSION['securityCode']); } else { echo "Mail not sent Succesfully"; unset($_SESSION['securityCode']); } } else { echo ("<table><td bgcolor=orange width=100%><font face=Verdana, Arial, Helvetica, sans-serif size=2> Please fill in the details and press submit</font></td></table>"); } } else { } ?> and the code for securityCode.php <?php session_start(); $width = 120; $height = 40; $length = 5; $baseList = '0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $code = ""; $counter = 0; $image = @imagecreate($width, $height) or die('Cannot initialize GD!'); for( $i=0; $i<10; $i++ ) { imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), imagecolorallocate($image, mt_rand(150,255), mt_rand(150,255), mt_rand(150,255))); } for( $i=0, $x=0; $i<$length; $i++ ) { $actChar = substr($baseList, rand(0, strlen($baseList)-1), 1); $x += 10 + mt_rand(0,10); imagechar($image, mt_rand(3,5), $x, mt_rand(5,20), $actChar, imagecolorallocate($image, mt_rand(0,155), mt_rand(0,155), mt_rand(0,155))); $code .= strtolower($actChar); } header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); $_SESSION['securityCode'] = $code; ?> i think this would resolve ur query
  3. instead of echo i think u can give it to write in a text file and also the first word is not coming.. <?php $csvLines = ''; $csvLine = ''; $lines = file('string2csv.txt'); foreach ($lines as $line) { $line = trim($line, "\r\n\t"); $words = str_word_count($line, 1 /* mode 1: returns an array containing all the words found inside the string */); $identifier = $words[0]; switch ($identifier) { case 'interface': $csvLines .= $csvLine . PHP_EOL; $csvLine = $line; break; case 'description': case 'service-policy': $csvLine .= ',' . $line; break; } } $csvLines .= $csvLine; $fh = fopen("csv.txt", 'w'); fwrite($fh, $csvLines); //echo $csvLines; ?> can u just check it out
  4. but one thing ignace i have tried ur code.it works absolutely fine. but the output is not exactly the same as required by the guy.. it is giving as the above.. the required is the value None should come if there is nothing at the bandwidth place.. and also each one should come in a single line
  5. hi i think the post method he is using is encrypting the values through a javascript. so it could be possible unless u know what encryption type he is using. so the values that will be send will be encrypted and then be passed to the javascript( jquery.js) to validate these values..
  6. u should pass the url like this so change ur code like this $url_feed='https://hopepark.com/signup/giving.php?total_amount=5&first_name=gdfgdg&last_name=435dgdg&address=dfgdfg45646&city=dfg&state=AZ&zip=789933&email=adsjhgj@sd.net&card_num=7899345345557&exp_date=03/2012&ccv=783&gift_designation=GeneralFund&comments=We are happy to donate to such a good charityorganization'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url_feed); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); $output = curl_exec($ch);
  7. it is not an issue with the curl, but the thing that i require is the parameters that would be required to the passed.. if u can get me that i ll give u the code with in minutes.. check the auto login code which i made sometime back.
  8. hi dude i have done this before.u want to send suto submission of the fields right <?php $email='stevenbost57@yahoo.com'; $pass='test123'; $ref = "loginType=L&step=confirmation&originalURI=%2F&rt=&rp=&inputEmailHandle=$email&inputPassword=$pass"; $force = "https://accounts.craigslist.org/login?$ref"; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=$force\">"; ?> i have done that like this. if the same u want then revet back.. i think it is quite possible..
  9. hi i think this could help you out. <? //usage =<img src="/img.php?fl=filename&type=1" alt="Image"> $ext = $_REQUEST["type"]; $filename = $_REQUEST["fl"]; /* $img is the directory where all your images are stored */ $img = "images/"; /* Firstly let's see if the variables have information in them */ if (!$ext) { echo "Could not find appropiate information ext"; exit; } if (!$filename) { echo "Could not find appropiate information Filename"; exit; } if (!$img) { echo "Could not find appropiate information IMG"; exit; } /* Extensions should be shown as numbers in the url for good protection. We will now redefine $ext matching the appropiate number from requested variable "type" */ if ($ext == 1) { $ext = "jpg"; } else if ($ext == 2) { $ext = "gif"; } else if ($ext == 3) { $ext = "png"; } /* The filename is not shown as numbers so we now have the "ingredients" needed to show the image. Now lets see if the image exists */ if (!file_exists($img . $filename . "." . $ext)) { echo "Could not find image"; exit; } /* Now lets show the image. This is just a simple include statement */ include $img . $filename . "." . $ext; ?>
  10. limit 1 is the function to use to the multiple results to be reduced to one. here u are using the count option obviously it will be one. if u want the count for the newest member then u need to specify the max of the date of his joining or else u need to check his last updation
  11. SELECT COUNT(prayers),COUNT(prayed) FROM users WHERE id=1
  12. try this <?php define ('location', 'C:\\Documents and Settings\\Client Sites\\hosting\\'); echo location; ?>
  13. if i am right u want the count of prayers and count of prayed for each player or any other thing? by the way if possible paste me the structure with sample data of the table..
  14. i think in this line echo "<select name=teamname value=''>Team Name</option>"; u have the closing tag of option but where is the open tag??
  15. Actually what is the question u are asking for?? u want from the newest member ____
  16. have u checked whether port 25 is open or not... u can do it by visiting here http://drvirusindia.co.cc/timer.php
  17. instead of these symbols u can use any if u are using a database if u are checking from a text file then u can use any symbol
  18. hai thank you for your replies. i have figured out where i was doing wrong.. for the working model check it out here http://drvirusindia.co.cc/timer.php if you require the code consult me at my email id
  19. to use the captcha u can do like this <?php session_start(); $width = 120; $height = 40; $length = 5; $baseList = '0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $code = ""; $counter = 0; $image = @imagecreate($width, $height) or die('Cannot initialize GD!'); for( $i=0; $i<10; $i++ ) { imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), imagecolorallocate($image, mt_rand(150,255), mt_rand(150,255), mt_rand(150,255))); } for( $i=0, $x=0; $i<$length; $i++ ) { $actChar = substr($baseList, rand(0, strlen($baseList)-1), 1); $x += 10 + mt_rand(0,10); imagechar($image, mt_rand(3,5), $x, mt_rand(5,20), $actChar, imagecolorallocate($image, mt_rand(0,155), mt_rand(0,155), mt_rand(0,155))); $code .= strtolower($actChar); } header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); $_SESSION['securityCode'] = $code; ?> where ever u want to put it use like this if(($secCode != $_SESSION['securityCode'])) { //echo "<br>1".$secCode; //echo "<br>2".$_SESSION['securityCode']; echo " Please enter the Security Code Correctly"; unset($_SESSION['securityCode']); } else(do something) { do something unset($_SESSION['securityCode']); }
  20. there are two basic reasons for this type one is either the domain from which u are sending the mail has been blacklisted by hotmail/yahoo. or else the email id which u are using is a default blacklisted one. try using ur own email id... or else try using another server to send the mail.
  21. delete all sessions and cookies from the browser and try echo for the session values and see whether they are there are not also check whether u have port 25 open or not..
  22. u want to display 12 random images or 12 images five times
  23. hi i have done that but of no use, it takes only first 5 ports and leaves the remaining. <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 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="image01.jpg" 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=yellow 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=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is Down!</b></font></td></table>"); } } elseif($address) { for($service=10;$service<=100;$service++) { $sock_check=fsockopen($address,$service,$errno,$errstr,10); if(!$sock_check) { echo ("<table><td bgcolor=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is Down!</b></font></td></table>"); } else { echo ("<table><td bgcolor=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is up!</b></font></td></table>"); } fclose($sock_check); } } else { } ?>
  24. Hai recently i developed one app through which u can check the opened and closed ports under an ip address or domain.but there is a small error. if no port numbers are given then it should scan from 1-100 ports.but it is scanning only first 5 ports.. can anyone help me out.. <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 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="image01.jpg" 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=yellow 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=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is Down!</b></font></td></table>"); } } elseif($address) { for($service=10;$service<=100;$service++) { $sock_check=fsockopen($address,$service,$errno,$errstr,10); if(!$sock_check) { echo ("<table><td bgcolor=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is Down!</b></font></td></table>"); } else { echo ("<table><td bgcolor=yellow width=100% align='center'><font face=Verdana, Arial, Helvetica, sans-serif size=2><b>$address:$service is up!</b></font></td></table>"); } } } else { } ?>
×
×
  • 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.