Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. well the data is being damaged somewhere then
  2. you can still pass the username and password.. just open another connection with mysql_connect();
  3. its probably magic quotes, if possible turn them off, if not use stripslashes() on the posted data
  4. Okay i was just thinking about the logic, the mysql_query will use the last "active" connection, if link is not set.. Soooo... maybe add mysql_connect(); right after $this->conn = $conn; this will be used any anything that doesn't use the link and will fail as theirs no database selected.. its worth a try
  5. I'm not sure if Mark is on the right track, but the problem is that once a connection is open, mysql_query is finds it with or without the link, so any mysql_query after db::instance(); will work, I guess opening the connection on use and then closing the connection after would work! but isn't ideal!
  6. And the error is probably basically a space isn't a valid part of a URL.. so your need to replace the space with a %20 <?php $url = "http://ci.durham.nh.us/government/Agendas/historic district commission/2009/hist06042009.html"; $url = str_replace(" ","%20",$url); echo file_get_contents($url); ?> your could also try encoding it all, here's draft (probably wrong) <?php $url = "http://ci.durham.nh.us/government/Agendas/historic district commission/2009/hist06042009.html"; $url = str_replace("%3A",":",implode("/",array_map("rawurlencode",explode("/",$url)))); echo file_get_contents($url); ?>
  7. you could define and initialize an static array variable: ie class Model_DbTable_Tree extends Zend_Db_Table_Abstract { protected $_name = 'tree'; protected $_primary = 'node_id'; public static $_JSON_HEADER = array("label" => "node_name", "identifier" => "node_id"); }
  8. is that the full page of "view_article.php"? where is $query set ?
  9. can you click topic solved bottom left please
  10. Personally I hate it The site too basic, When I open the upload page i get an "Invalid file" then the example URL doesn't encode the url. When i login i get redirect twice, via meta tag or JavaScript which mean the flash starts to play then stops and starts again. But why login when you can just go to http://www.uploadfast.isgreat.org/index/loginupload.php and save the whole login in process. The site doesn't remember me, even when i don't leave, to i have to login over and over. is their a limit on the upload size ? just say invalid file when i upload a large one Most image sites have atleast some sort of caching.. none on this one! and of course conflicting names! well you need to handle that better! design isn't that great either This looks like someone when to php.net uses a basic upload file created a simple create account/login to account script then when to monstertemplates.com grabs a flash banner, and mashed it up on a page!
  11. the if logic is wrong try this <?php error_reporting(E_ALL); /*$_POST */ $subject = 'New message from site'; $userMessage = $_POST['message']; $userName = $_POST['userName']; $userEmail = $_POST['email']; $email = 'myemail@mywebsite.com'; $message = "Email sent from $userName \n Reply: $userEmail \n Message: $userMessage"; if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) { echo "<h4>Invalid email address</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; }elseif(mail($email,$subject,$message)) { echo "Subject: $subject<br/> User Name: $userName<br/> Posted Message: $userMessage<br/> Email Message: $message<br/><br/> To email: $email"; echo "<h4>Thank you for sending email</h4>"; } else { echo "<h4>Can't send email to $email</h4>"; } ?>
  12. Constants differ from normal variables in that you don't use the $ symbol to declare or use them.
  13. LOL, That's a good idea, from now on I am going change my documentation and call all the bugs features! Can you post lines, a few lines around line 26 of view_article.php code feel free to leave it in the system but its really not recommended
  14. Try this <?php $url = arrayUrl($_GET['url']); $file = $html->includeAttachment($url['2'], $url['3']); if(filesize($file) >0) { header("Content-Type: image/png"); readfile($file); }else{ echo "error too smalled check read permissions to file and folder"; } ?>
  15. MadTechie

    CSS File Size

    I use minify myself, and YSlow to check my pages EDIT: oh and gzip works well, and caching
  16. Sure, okay start here, this allows you to create a simple form, however change $_REQUEST to $_POST Once you understand that, i would recommend moving to PHPMailer, as this is easier in the long run, (adding attachments, using HTML, etc) PHP MAILER examples Now once you have that, add captcha here one you can use and check their quick start Okay.. now the DNSBL, this maybe a little harder but here is one okay well theirs all the parts get each part working by itself then add one at a time So save a copy of your form mail, remove mail() and add phpmailer, test, then add captcha, test, then i'm not sure how you want to use the DNSBL!
  17. you could also assume i only used 1 letter in lowercase as well to bring the odds down. Well a 2TB Hard drive is £187.74 so about £1,000,000 should cover it. then i need to get a system that supports it, then fill that up with my password.. then probably buy a new CPU as the old would probably died, then run MD5 on it.. have a cup of tea while I wait.. 1.2 petabytes of storage
  18. Sure, how much you offering.. I'll move this for you if you like
  19. Really you know that for a fact! Your assuming its under a petabyte, why not a yottabyte.. Letters and number.. again assuming ~Sighs!~ but that still doesn't get you my original input!
  20. Not really, but you could try this <?php $proxyheader = array( 'HTTP_VIA', 'HTTP_X_FORWARDED_FOR', 'HTTP_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED', 'HTTP_CLIENT_IP', 'HTTP_FORWARDED_FOR_IP', 'VIA', 'X_FORWARDED_FOR', 'FORWARDED_FOR', 'X_FORWARDED', 'FORWARDED', 'CLIENT_IP', 'FORWARDED_FOR_IP', 'HTTP_PROXY_CONNECTION' ); $valid = true; foreach($proxyheader as $p) { if(isset($_SERVER[$p])) { $valid = false; } } if(!$valid){ die ("Using proxy"); } ?>
  21. if you don't post you can watch a post by using Notify, this can be controlled by the Notifications in the control panel but once you posted you have no control, it always appears when you click "Show new replies to your posts." which makes sense but can be a pain! when your no longer active in that post, IE if i say "this is a Apache problem not PHP" and then move the thread it will continue to appear on my list.
  22. That would be a good mod!
  23. Agreed! I gave an example of this here in this thread EDIT: maybe we should move this thread to Miscellaneous
  24. Your just not getting it are you! What makes you think in 5000 years your get the correct value ? why not 10000 years or 10000000000 years no matter how long to attempt it your always have more.. and your never know which one I generated the hash from.. the simple fact of the matter is you will never know what I used to create that hash, because you don't have the data you need, thus again its impossible! its like X mod 10 = 6 What did I enter as X to get 6, NOT what CAN you enter to get 6. You could say well it will be in my infinite list of possibilities.. but that's not possible
×
×
  • 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.