Jump to content

superpimp

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by superpimp

  1. [!--quoteo(post=376830:date=May 25 2006, 12:35 AM:name=appeland)--][div class=\'quotetop\']QUOTE(appeland @ May 25 2006, 12:35 AM) [snapback]376830[/snapback][/div][div class=\'quotemain\'][!--quotec--] [a href=\"http://ip-to-country.webhosting.info/\" target=\"_blank\"]http://ip-to-country.webhosting.info/[/a] Free IP to country DB, they even give you the redy php script. Cheers, Andi [/quote] thanks, and what about tracing the ip? like, from 61.32.45.32 to dsl.61-32-45-32.aol.com (just an example ip.)
  2. Is it possible to "trace" an IP via PHP? ex: you want to know from what country your visitors are from, you log there ip's and trace them. thx!
  3. [!--quoteo(post=372917:date=May 10 2006, 03:54 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 10 2006, 03:54 PM) [snapback]372917[/snapback][/div][div class=\'quotemain\'][!--quotec--] It may be part of PHP, but it is the tool of phishers, and we won't allow posting of answers for that type of work on these forums. [/quote] ohhh, ok :)
  4. [!--quoteo(post=372376:date=May 8 2006, 09:26 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 8 2006, 09:26 PM) [snapback]372376[/snapback][/div][div class=\'quotemain\'][!--quotec--] I will allow answers to the proxy question, but any responses to referrer spoofing will be deleted. You've been warned, superpimp. [/quote] ok, but that too is just a part of PHP, so...
  5. I know websites that have proxies, most of them are PHP based. Now, I was wondering, how do you do that? How does it go in is work? I found source codes of proxies but they never worked, I could see parts of the source when running them so :s Same thing goes for referer spoofers... Could anyone explain me this?
  6. it means the page was removed from the host/server so it's no longer available
  7. I have PHP 5.0 so i guess I'll have to install it. Where can I get it?
  8. I've got this peace of code that generates a blue image with a white line on it, well it should. When I try to run it it says this: Fatal error: Call to undefined function imagecreatetruecolor() in C:\wamp\www\test.php on line 5 I checked the PHP manual and there is a function like this and Dreamweaver recognizes it. What should I do? [code]<?php // set up image   $height = 200;   $width = 200;   $im = imagecreatetruecolor($width, $height);   $white = imagecolorallocate($im, 255, 255, 255);   $blue = imagecolorallocate($im, 0, 0, 64); // draw on image     imagefill($im, 0, 0, $blue);   imageline($im, 0, 0, $width, $height, $white);   imagestring($im, 4, 50, 150, 'Sales', $white); // output image   header ('Content-type: image/png');   imagepng ($im);    // clean up   imagedestroy($im); ?>[/code] thx!
  9. I don't think that's possible, I could be wrong tho. But I think you need acces to the DB amazon stored all the products in, which I guess you don't have...
  10. [!--quoteo(post=369272:date=Apr 27 2006, 06:24 PM:name=change)--][div class=\'quotetop\']QUOTE(change @ Apr 27 2006, 06:24 PM) [snapback]369272[/snapback][/div][div class=\'quotemain\'][!--quotec--] When i run this script below it prints out correctly on screen (echo $value) and gives me the following: milk eggs bread However, the emails that I receive for each array value is incorrect. It should send me 3 separate emails that have just one of each value in them. In other words, one email would have milk, the next would have eggs, the next would have bread. However, what I'm getting is one email that has milk, the next has milk and eggs, and the last one has milk, eggs, and bread. Please help! :) <?php $array = array('milk','eggs','bread'); foreach ($array as $array => $value) { $mailbody.="$value\n\n"; mail("me@myself.com", "testing 123", "$mailbody", "From: Myself<me@myself.com>"); echo "<p>$value</p>"; } ?> [/quote] Well, that should work, I did it like that on my mail script too. here's part of the code, hope you can use it :) basicly it's a form for a mail bomber but if you replace $counter with $mailbody, it should work too.. [code] <?php $to=$_POST['to']; $from=$_POST['from']; $reply=$_POST['reply']; $headers="From: ".$from."\r\nReply-To: ".$reply; $subject=$_POST['subject']; $message=$_POST['textarea']; $num=$_POST['num']; $counter=range(1,$num); foreach($counter as $counter) {         mail($to, $subject, $message, $headers)){     echo "<title>Mail sent!</title>\r\n";     echo "<p>Mail n° ".$counter." succesfully sent!\r\n"; } ?> [/code]
  11. [!--quoteo(post=367705:date=Apr 23 2006, 05:44 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 23 2006, 05:44 PM) [snapback]367705[/snapback][/div][div class=\'quotemain\'][!--quotec--] You might want to look into [a href=\"http://uk.php.net/manual/en/function.fsockopen.php\" target=\"_blank\"]fsockopen[/a] instead. With fsockopen you can set when it timesout. [/quote] When I use fsockopen I can't get it to work :s
  12. I'm checking a whole bunch of url's, it's gonna take ages, is it possible to set a timeout, after which fopen stops and reports it dead? thx!
  13. [code] <?php $url_to_open="http://www.google.com"; $file=file_get_contents($url_to_open); echo $file; ?> [/code] this should do. No pictures/files/movies/... will be shown if the admin of the site links to them as images/image.jpg instead of [a href=\"http://site.com/images/image.jpg\" target=\"_blank\"]http://site.com/images/image.jpg[/a] in the last case, pictures WILL be shown :) Have fun at school ;)
  14. Is there a page where I can get an explation for fosockopen's $errno? I searched the php.net site and google but didnt found a thing. When I echo $errstr, it's blank. [code] <?php $host = "www.efzefrzefgoogle.com"; //zu prüfender host $timeout = 10; //timeout in sekunden if(@fsockopen($host, "80",$errno,$errstr,$timeout)) //prüfen, ob der host erreichbar ist, das @ unterdrückt fehlerausgabe { echo "<p>Online!</p>"; } else { echo "<p>Offline!</p>".$errno; } ?> [/code] thx!
  15. [!--quoteo(post=367473:date=Apr 22 2006, 06:00 PM:name=Tim)--][div class=\'quotetop\']QUOTE(Tim @ Apr 22 2006, 06:00 PM) [snapback]367473[/snapback][/div][div class=\'quotemain\'][!--quotec--] Use [a href=\"http://www.php.net/mcrypt\" target=\"_blank\"]mcrypt[/a]. [/quote] Well, I read that manual, but I dont get a thing. [code] <?php $key = "this is a secret key"; $input = "Let us meet at 9 o'clock at the secret place."; $encrypted_data = mcrypt_ecb (MCRYPT_DES, $key, $input, MCRYPT_ENCRYPT); ?> [/code] What string is gonna be encrypted? $key or $input?
  16. Is it possible to encrypt strings into DES? thx!
  17. [!--quoteo(post=364150:date=Apr 12 2006, 08:29 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 12 2006, 08:29 PM) [snapback]364150[/snapback][/div][div class=\'quotemain\'][!--quotec--] The "spaces" you are seeing are really the newline characters at the end of each line. HTML will display newline characters as a space. Use the trim() function to remove the newline character before echoing the string: [code]<?php $file=file('dict.txt'); foreach ($file as $file2)    echo trim($file2); ?>[/code] Ken [/quote] thanks alot :D
  18. I've got a table with about 500 entries. I want to show 50 entries on 1 page and the rest on separate pages like: .php?page=2, that would show the second 50 entries. how do I do that?
  19. [code] <?php $file=file('dict.txt'); $file=str_replace(' ','',$file); foreach ($file as $file){ $file2=str_replace(' ','',$file); echo $file2; } ?> [/code] The file dict.txt has 1 word on every line, no spaces after them. This bit of code echoes spaces between every word but there are no spaces in the file! I tried replacing them with nothing as you see in the code but that wont work! What should I do? thx!
  20. the problem was I opened with <? instead of <?php stupid mistake...
  21. well, it sucks. that doesnt work. its very weird, i've added extra things, that work in other scripts but they wont work here, grrr. I even tried your code, doenst work either :( [code] $file=file('test.txt'); $file2=file_get_contents("test.txt"); $filecontents = file_get_contents("test.txt"); $count=count($file); $random=rand(0,$count-1); echo $file[$random]; echo $file2; echo $filecontents; [/code] this gives a blank screen :( What am I doing wrong??? edit: THANKS, I found the error :)
  22. well, the file is in the same path as then .php file, so actually I shouldn't specfy a path...
  23. Like file('c:\test\file.txt'); ?
  24. How do I select a line from a file? If I have a file like this: [code] hello hi test etc... [/code] I want to select like "hello" and "hi", ... as seperate text. I tried this: [code] <?php $file=file('file.txt'); $count=count($file); $random=rand(0,$count); echo $file[$random]; ?> [/code] but that doesnt work... thx!
×
×
  • 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.