Jump to content

Janice

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Janice

  1. Janice

    stats

    i have created a page like this.. i dont use any database for this..actually it is a form page followed by a stats box. when someone enter the form, it should add 1 extra number of members in stats and when someone enter total work(1000), it should be added in the stats aswell.
  2. I have another doubt..Email ID:</b><input type="text" name="email" size="20" />this will give output with a box for email id to be entered..how to make it show without a box?
  3. thanks alot justsomeguy .. you are always informative..it worked fine when I set 777 permissions to "images" folder but I know it is not safe!I will try your codings and let you know
  4. I hope I would get a good reply from someone who really knows what the issue is
  5. functions.php <?phpfunction standardheader($title) {?><!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/xtml" xml:lang="en" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title><?php echo $title; ?></title></head><body><?php}function stdfoot() {?></body><html><?php} class ocr_captcha { var $key; // ultra private static text var $long; // size of text var $lx; // width of picture var $ly; // height of picture var $nb_noise; // nb of background noisy characters var $filename; // file of captcha picture stored on disk var $imagetype="png"; // can also be "png"; var $public_key; // public key var $font_file="./include/adlibn.ttf"; function ocr_captcha($long=6,$lx=120,$ly=30,$nb_noise=25) { $this->key=md5("A nicely little text to stay private and use for generate private key"); $this->long=$long; $this->lx=$lx; $this->ly=$ly; $this->nb_noise=$nb_noise; $this->public_key=substr(md5(uniqid(rand(),true)),0,$this->long); // generate public key with entropy } function get_filename($public="") { if ($public=="") $public=$this->public_key; return "images/".$public.".".$this->imagetype; } // generate the private text coming from the public text, using $this->key (not to be public!!), all you have to do is here to change the algorithm function generate_private($public="") { if ($public=="") $public=$this->public_key; return substr(md5($this->key.$public),16-$this->long/2,$this->long); } // check if the public text is link to the private text function check_captcha($public,$private) { // when check, destroy picture on disk if (file_exists($this->get_filename($public))) unlink($this->get_filename($public)); return (strtolower($private)==strtolower($this->generate_private($public))); } // display a captcha picture with private text and return the public text function make_captcha($noise=true) { $private_key = $this->generate_private(); $image = imagecreatetruecolor($this->lx,$this->ly); $back=ImageColorAllocate($image,intval(rand(224,255)),intval(rand(224,255)),intval(rand(224,255))); ImageFilledRectangle($image,0,0,$this->lx,$this->ly,$back); if ($noise) { // rand characters in background with random position, angle, color for ($i=0;$i<$this->nb_noise;$i++) { $size=intval(rand(6,14)); $angle=intval(rand(0,360)); $x=intval(rand(10,$this->lx-10)); $y=intval(rand(0,$this->ly-5)); $color=imagecolorallocate($image,intval(rand(160,224)),intval(rand(160,224)),intval(rand(160,224))); $text=chr(intval(rand(45,250))); ImageTTFText ($image,$size,$angle,$x,$y,$color,$this->font_file,$text); } } else { // random grid color for ($i=0;$i<$this->lx;$i+=10) { $color=imagecolorallocate($image,intval(rand(160,224)),intval(rand(160,224)),intval(rand(160,224))); imageline($image,$i,0,$i,$this->ly,$color); } for ($i=0;$i<$this->ly;$i+=10) { $color=imagecolorallocate($image,intval(rand(160,224)),intval(rand(160,224)),intval(rand(160,224))); imageline($image,0,$i,$this->lx,$i,$color); } } // private text to read for ($i=0,$x=5; $i<$this->long;$i++) { $r=intval(rand(0,128)); $g=intval(rand(0,128)); $b=intval(rand(0,128)); $color = ImageColorAllocate($image, $r,$g,$; $shadow= ImageColorAllocate($image, $r+128, $g+128, $b+128); $size=intval(rand(12,17)); $angle=intval(rand(-30,30)); $text=strtoupper(substr($private_key,$i,1)); ImageTTFText($image,$size,$angle,$x+2,26,$shadow,$this->font_file,$text); ImageTTFText($image,$size,$angle,$x,24,$color,$this->font_file,$text); $x+=$size+2; } if ($this->imagetype=="jpg") imagejpeg($image, $this->get_filename(), 100); else imagepng($image, $this->get_filename()); ImageDestroy($image); } function display_captcha($noise=true) { $this->make_captcha($noise); $res="<input type=hidden name='public_key' value='".$this->public_key."'>\n"; $res.="<img align=middle src='".$this->get_filename()."' border='0'>\n"; return $res; } }?>
  6. I have a php verification / landing verification / image verification page. It worked fine before,Now i get this error after uploading and I dont see the image.Warning: imagepng() [function.imagepng]: Unable to open 'images/b804e0.png' for writing in /home/megax/public_html/include/functions.php on line 114What would be wrong?
  7. Janice

    php validation page

    thanks alot.. i will try this
  8. Janice

    php validation page

    Since I am a newbie, I dont understand this
  9. Janice

    php validation page

    hi all,i would like to know how to create a validation first page. something like the one in http://football2gold.comUser must enter a validation code (any number or alphabets) to enter the site.Since I am new to php, I would like to get a detailed answer with codings.Hope someone could help me, as this forum is the best place for learners
  10. How to add visual confirmation page? Something like, when someone goes to www.example.com, they will see any random numbers like turing numbers to enter to index page.
  11. Hello everyone, Hope you all fine here. I am in need of a help. Anyone know how to add a DDOS protection first page for a website? Something like typing a code to enter the website?I would be glad to get a detailed explanation for this with codings.Thanks alot. I always get excellent help here.Long Live w3 forum members
  12. Janice

    Help

    It works just fine..Thank yall
  13. Janice

    Help

    This aint work. I would like to get some more explanation. Please
  14. Janice

    Help

    Is it real hard?
  15. Janice

    Help

    Hi,Thanks alot for your help! It should go to the inputted username (inputted username.php)
  16. Janice

    Help

    Hi,This really is the best place to get infos. Thanks alot for that. I would like to thank justsomeguy for his excellent helping tendency.I am looking for something. User : username (box) SubmitWhen someone clicks submit, it should go to www.site.com/username.phpIs it possible to make something like this? I would be real glad if someone help me with this.Also, I would like to know how to make a scrolling text box, something like News Box that should scroll up automatically.Thank you guys.
  17. Janice

    Need help in php

    Thanks alot for your timely help justsomeguy. Hard to find people who help alot :)Cheers!
  18. Janice

    Need help in php

    Thanks much for your reply. I bought this flash template Readymade. They gave me the .fla file too though.I dunno much about flash. Since it is a readymade template, I can edit the content of the flash template. I didnt know I have to edit flash source file to get this action to be done. The output is a single flash page (index.html or php) and I have added a link in that flash page that goes to signup.php (which is not a flash page and it is a different HTML page, no relation between index flash page and signup form page)So, no other way I can add a ref like I said before other than this? I dont know this. I would be very happy if you give me more details. Where and how to add this code?
  19. Janice

    Need help in php

    I am very glad to be a member in this forum. I hope I would find a solution for my need here :)I know nothing about flash, so please dont mistake me if this is a dumb question :)Well I have a flash template. I use a link there for signup (signup.php)It opens to a new page - http://sitename.com/signup.php.Signup form contains details like -username :state:country: ....these details are sent to my mail when someone signup. What I need is.. I wish to add a referral system. Something like http://sitename.com/?ref=*somenumbers*So when someone uses this referral URL and click the signup link, I need this option in signup form Referrerd by *123* and this referral detail asusual sent to my email when someone signup along with the signup form details (name, state, country ... and Referred by *123*)I dont want to use database here because I am not sure how to handle databases. The index flash page I will use is index.phpI would be reallllllllll flad if someone help me with this with a detailed code.Advance thanks...Janice
×
×
  • Create New...