Jump to content

youneek

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

youneek's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's not sending emails and is only retrieving the headers to write to a file. I run it locally and can see it's using hardly any ram... I have another script that can write 40,000 lines using fwrite without any issues. Is there a more effective way to do what I am doing?
  2. I have tested the tool. If I stop and reset it to start at 20,000 it runs at full speed again... Any suggestions? for($i=20000; $i<=$count; $i++) {
  3. Does anyone know why this starts to go so slow or a way to get this script working better? I have tested retrieving the higher number messages and can retrieve them fine individually... <? set_time_limit(0); $imap = imap_open("{imap.server.loc}", "emailaddy", "pass")or die(imap_last_error()."<br>Connection Failure!"); $count = imap_num_msg($imap); $fh = fopen('results.csv', 'w') or die("can't open file"); for($i=1; $i<=$count; $i++) { $header = imap_header($imap, $i); $prettydate = date("m/d/Y", $header->udate); $user = strtolower($header->sender[0]->mailbox); $host = strtolower($header->sender[0]->host); if(!empty($user)){ fwrite($fh, $user.'@'.$host.','.$prettydate."\n"); } } imap_close($imap); ?>
  4. How could I convert this script to use cURL? if (isset($_POST["url2"])){ $url = $_POST["url2"]; $data = implode("", file($url)); preg_match_all ("/<title>(.*?)<\/title>/i", $data, $allurl); foreach ( $allurl[0] as $addr ){ $path = "http://web.archive.org/web/*/http://".trim($addr, "\r"); $data2 = implode("", file($path)); preg_match_all ("/<p class=\"mainSearchTitle\">([^`]*?)<\/p>/", $data2, $matches); foreach ($matches[0] as $match) { $match = strip_tags($match); echo trim(preg_replace("/ pages found for/", "", $match), " ")."<br />"; flush(); ob_flush(); } } }else{
  5. Can anyone help me figure out how to make this script run faster? <? if (!isset($domains)){ ?> <form method="post" action=""> <textarea name="domains" rows="10" cols="30"></textarea><br /> <input type="submit" value="Send"> </form> <? }else{ $domains = explode("\n", $_POST['domains']); foreach ( $domains as $addr ){ $url = "http://web.archive.org/web/*/http://".trim($addr, "\r"); $data = implode("", file($url)); preg_match_all ("/<p class=\"mainSearchTitle\">([^`]*?)<\/p>/", $data, $matches); foreach ($matches[0] as $match) { $match = strip_tags($match); echo trim(preg_replace("/ pages found for/", "", $match), " ")."<br />"; flush(); ob_flush(); } } } ?>
  6. I wrote a script to help figure out an archive.org score. It is supposed to lookup muliple domains, but isn't working. It's only doing one. Can somebody help? <? if (!isset($_GET["domains"])){ ?> <form method="GET" action=""> <textarea name="domains" rows="10" cols="30"></textarea><br /> <input type="submit" name="send" value="Send"> </form> <? }else{ $domains = explode("\n", $_GET['domains']); foreach ($domains as $addr){ $url = "http://web.archive.org/web/*/http://".$addr; $data = implode("", file($url)); preg_match_all ("/<p class=\"mainSearchTitle\">([^`]*?)<\/p>/", $data, $matches); foreach ($matches[0] as $match) { $match = strip_tags($match); echo $match."<br />"; } } } ?>
  7. is there any slashes like // in front of the $recipient or anything?
  8. That script will probably only run on a linux server and you are probably on windows. (I didn't see if you specified)
  9. Wouldn't you need something like the below in your header? [code] <SCRIPT TYPE="text/javascript"> <!-- function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string')   href=mylink; else   href=mylink.href; window.open(href, windowname, 'width=400,height=200,scrollbars=yes'); return false; } //--> </SCRIPT> [/code]
  10. You probably don't want to use an htaccess file for that. The way it redirects you, will force the htaccess file to prompt you every time the page refreshes. You could probably use a basic authentication script instead. since the scipt they use that loads the photos is phpslideshow.php you could just use an include at that php file to load an authentication script that checks if they have a cookie set. If they do it'll show the pages and if the pages refresh it'll see the cookie is still there so no problems. If they havn't logged in, then all they will see is a login box. I found one recently on hotscripts.com that worked real well.
  11. You might also just make an if statement that says if session = admin session then {full access}else {normal authentication method}
  12. From what I can tell, it looks like anyone could just add a cookie to their browser with the right username and get past your script. If you have an account called admin, guest, etc than it would probably pretty easy to get around. It's usually safest if you have php do md5 encryption, store the encrypted password in a database, then check the cookie against the encrypted password. If you want to get real dirty you can have it use the time added to the end of the encrypted password to really throw off someones cracking tool. Unless you have a site with important information like credit card numbers etc, then just basic md5 encryption is probably all you need. Just make sure you are not passing the "plain text" version of the password into the cookie or you could also help hackers get into any other website that person goes to. Many people use the same password for all their sites like banks etc.
  13. This would be difficult, but you would want to splice the map and map each area. Then you would want each area to have an ID or something associated with it in a database. You would then want everyone in that area to use the same identifier for that area or state. You would have a form on a page using GET to retrieve the ID, and display (through javascript or whatever) the names that corespond with that ID in the database.
  14. Couldn't you put it anywhere in the script? I would assume that you could put it just after the <? tag at the beginning of the file and it would work.
  15. Is the certificate an image, html, text, etc?
×
×
  • 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.