Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. add a target_blank to the line <form method="POST" action=" <? echo $navurl; ?> "target="blank"> like this
  2. if u want to get the source of the page us this curl tool which i have done long backk.. i didnt tested with your site yet.. <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); $output = curl_exec($ch); $fh = fopen("output.txt", 'w'); fwrite($fh, $output); ?>
  3. stop it you twoo.. it is not a fighting club... @jp15 check these upload scripts..u can use any one of these scripts [attachment deleted by admin]
  4. in this remove the double qoutes from mysql_connect("$host", "$username", "$password") mysql_select_db("$db_name") and make it some thing like this mysql_connect($host, $username, $password)or die("cannot connect"); mysql_select_db($db_name)or die("cannot select DB");
  5. try this one.. u will get to know.. <?php $time=date('Hi'); $time_add=$time+30; $time_min=substr($time_add, -2); $time_hr=substr($time_add, 0, 2); if($time_min>=60) { $sub_min_add=60-date('i'); $sub_hr_add=date('H')+1; echo "Present time is ".$time."<br>"; echo "Time after 30 minutes is ".$sub_hr_add.$sub_min_add; } else { echo "Present time is ".$time."<br>"; echo "Time after 30 minutes is ".$time_add; } ?>
  6. then u need to fetch the present time and add 30 to the last two digits if the count >=60 then add the subtract the last two digits value from 60 and add that + add 1 to the first two digits and now add the remaining to the obtained value. i guess u got the idea..i will work on the code and paste it here
  7. dude i dont want to install the VC++. I want to know whether there is any other alternative available for this issue
  8. u can do like write a form there and on click of submit button include one more php file by passing the values to that one... u can pass values to other php as file.php?user=$user and likewise... at the other file u can use the _GET fucntion to get these values and then redirect to the phpform.php file after successfull completion of sending mail..
  9. check this code.. <?PHP FUNCTION getCurrentPage() { $thedomain .= "http://"; $thedomain .= $_SERVER['HTTP_HOST']; $thedomain .= $_SERVER['REQUEST_URI']; RETURN $thedomain ; } ECHO "The current URL is: ".getCurrentPage()."!"; ?>
  10. dont have VC++.. any alternate solution of php_dbx.dll. i have downloaded this from some site and copied it to the php\ext folder and added this line in the php.ini extension=php_dbx.dll but when i start the apache. it gives me an error something like this.. --------------------------- Warning --------------------------- PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_dbx.dll' - The specified module could not be found. --------------------------- OK --------------------------- need helpppp....
  11. how to do the compilation of php in windows machine..
  12. does any one know how to install dbx... i have installed xampp 1.7.2 but this does not support dbx.. any ideas??
  13. try using this script from the website http://softacme.com/radhikagb/
  14. why dont u change the execution time to max limit in php.ini file
  15. i cannot understand ur example abt the 4:30 thing...
  16. hai i got one script downloaded long back from some guys site. The site is http://view.samurajdata.se/.. just check with this... [attachment deleted by admin]
  17. Hai change this code ?php $host="host_name_here"; // Host name $username="username_here"; // Mysql username $password="password_here"; // Mysql password $db_name="DB_name_here"; // Database name $tbl_name="TB_name_here"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); to some thing like this <?php $host="localhost"; // Host name $username="username_here"; // Mysql username $password="password_here"; // Mysql password $db_name="DB_name_here"; // Database name $tbl_name="TB_name_here"; // Table name // Connect to server and select databse. mysql_connect($host, $username, $password)or die("cannot connect"); mysql_select_db($db_name)or die("cannot select DB"); are u sure is this file which is giving a problem... can u copy the check.php file
  18. u can even check this script http://www.nashruddin.com/Resize_Image_to_Different_Aspect_Ratio_on_the_fly or else try with this script <?php header ("Content-type: image/jpeg"); /* JPEG / PNG Image Resizer Parameters (passed via URL): img = path / url of jpeg or png image file percent = if this is defined, image is resized by it's value in percent (i.e. 50 to divide by 50 percent) w = image width h = image height constrain = if this is parameter is passed and w and h are set to a size value then the size of the resulting image is constrained by whichever dimension is smaller Requires the PHP GD Extension Outputs the resulting image in JPEG Format By: Michael John G. Lopez - www.sydel.net Filename : imgsize.php Modified by: Nash - http://nashruddin.com Added: - displays default image if the requested image doesn't exist - hide image path from user */ $path = '/path/to/your/images'; // change to where your images reside $img = $path . '/' . $_GET['img']; if (file_exists($img)) { $percent = $_GET['percent']; $constrain = $_GET['constrain']; $w = $_GET['w']; $h = $_GET['h']; } else { $img = $path . '/default.jpg'; // change with your default image $percent = 100; } // get image size of img $x = @getimagesize($img); // image width $sw = $x[0]; // image height $sh = $x[1]; if ($percent > 0) { // calculate resized height and width if percent is defined $percent = $percent * 0.01; $w = $sw * $percent; $h = $sh * $percent; } else { if (isset ($w) AND !isset ($h)) { // autocompute height if only width is set $h = (100 / ($sw / $w)) * .01; $h = @round ($sh * $h); } elseif (isset ($h) AND !isset ($w)) { // autocompute width if only height is set $w = (100 / ($sh / $h)) * .01; $w = @round ($sw * $w); } elseif (isset ($h) AND isset ($w) AND isset ($constrain)) { // get the smaller resulting image dimension if both height // and width are set and $constrain is also set $hx = (100 / ($sw / $w)) * .01; $hx = @round ($sh * $hx); $wx = (100 / ($sh / $h)) * .01; $wx = @round ($sw * $wx); if ($hx < $h) { $h = (100 / ($sw / $w)) * .01; $h = @round ($sh * $h); } else { $w = (100 / ($sh / $h)) * .01; $w = @round ($sw * $w); } } } $im = @ImageCreateFromJPEG ($img) or // Read JPEG Image $im = @ImageCreateFromPNG ($img) or // or PNG Image $im = @ImageCreateFromGIF ($img) or // or GIF Image $im = false; // If image is not JPEG, PNG, or GIF if (!$im) { // We get errors from PHP's ImageCreate functions... // So let's echo back the contents of the actual image. readfile ($img); } else { // Create the resized image destination $thumb = @ImageCreateTrueColor ($w, $h); // Copy from image source, resize it, and paste to image destination @ImageCopyResampled ($thumb, $im, 0, 0, 0, 0, $w, $h, $sw, $sh); // Output resized image @ImageJPEG ($thumb); } ?>
  19. i know a small code it is not of ur requirement but i think this would give u an idea <? //set the urls $urls = array("http://google.com" ,"http://hotmail.com" ,"http://phpfreecode.com" ); //set the text links $text = array("Google" ,"Hotmail" ,"phpfreecode"); srand(time()); //set the number in (rand()%3); for however many links there are $random = (rand()%3); echo ("<a href = \"$urls[$random]\">$text[$random]</a>")."<br>"; ?>
  20. for proportional resizing u need to use an external application like image magick or some thing.. http://php.net/manual/en/book.imagick.php
  21. try using this one <?php resize("./", "http://images.wsdot.wa.gov/nwflow/flowmaps/sysvert.gif", "538", "./"); function resize($cur_dir, $cur_file, $newwidth, $output_dir) { $dir_name = $cur_dir; $olddir = getcwd(); $dir = opendir($dir_name); $filename = $cur_file; $format='image/gif'; if(preg_match("/.jpg/i", "$filename")) { $format = 'image/jpeg'; } if (preg_match("/.gif/i", "$filename")) { $format = 'image/gif'; } if(preg_match("/.png/i", "$filename")) { $format = 'image/png'; } if($format!='') { list($width, $height) = getimagesize($filename); $newheight=$height*$newwidth/$width; switch($format) { case 'image/jpeg': $source = imagecreatefromjpeg($filename); break; case 'image/gif'; $source = imagecreatefromgif($filename); break; case 'image/png': $source = imagecreatefrompng($filename); break; } $dimg = imagecreatetruecolor(640,538); imagealphablending($dimg, false); $source = @imagecreatefromgif("$filename"); imagecopyresized($dimg, $source, 0,0,0,438, $newwidth, $newheight, $width, $height); $filename="$output_dir/test1.gif"; @imagegif($dimg,$filename); } } ?>
  22. try creating ur own search engine..sphider or digg or else try passing the search url for the keyword and display it in a iframe or else use a table this is the url for the keyword search..Modify it top ur needs http://www.google.co.in/#hl=en&source=hp&q=hai&btnG=Google+Search&meta=&aq=f&oq=hai&fp=44adc7acd595e18a
  23. Cool reply thank you dude..
  24. Dear Irvon ur function does not work.. as strptime is not a valid php function. and for the info u require i am getting the date value as like this.. date('l jS \of F Y h:i:s A') i have checked the php manual but didnt found any solution for my issue. :'( Can some one help me out on this..
×
×
  • 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.