Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. search the forum for $_GET, as this topic has be coved lots of times one of which was less than a day ago! <a href="OrganiseIDASX.php?id=<?php echo $_GET['id'] ?>"> If you have a form with method='GET' all the values from the elements are processed via the URL ie ?id=1&name=madtechie to grab this info use $_GET['id']; //for the ID (1) $_GET['name']; //for the name (madtechie)
  2. erm.. not sure what you mean by 'make php instantly close' but die; would work
  3. the browser wouldn't have a url with ../../ it would show the absolute URL, as for php using ../../ i have done some tests and it seams fine w/out ../../ my tests have worked fine but without more infomation i can't really help
  4. maybe you should run some tests! edit reading the manual also helps cURL
  5. Or... post your code (remove user&pass) and i'll test it on my FTP of course i havn't had a problem but their maybe something in your code causing the problem!
  6. Hummm, is the username and password required? as i would like to test it myself, if you can change the username/password or setup a new one for me to test i'll be happy to try myself, the reason i ask is because i am kinda shooting in the dark at the moment! edit: feel free to PM me
  7. navigate to the file, then copy the url add the username:password@ then add the file name to the end, thats should be it!
  8. you can not navigate outside the public_html folder from a http steam if its ftp your need to check you access rights on that login..
  9. here this works /((.*)\2{2,})/im <?php $this_is_how_it_looks_to_begin_with= "This is a teeeeest of repeating something over and over and over and over and over and over many tiiiiiimes like so so so so"; $this_is_how_it_should_look_afterwards= "This is a teest of repeating something over and over and over many tiimes like so so"; $str=$this_is_how_it_looks_to_begin_with; while($str!=$old){ $old=$str; $str=preg_replace('/((.*)\2{2,})/im','$2$2',$str);} //REGEX STUFF--------^----------^ echo"<style type='text/css'>@import'http://69.89.21.68/~freethep/.css';</style><center><table><tr><td>This is how it looks to begin with</td><td>$this_is_how_it_looks_to_begin_with</td></tr><tr><td>This is how it looks afterwards</td><td>$str</td></tr><tr><td>This is how it SHOULD look afterwords</td><td>$this_is_how_it_should_look_afterwards</td></tr></table>"; echo($str==$this_is_how_it_should_look_afterwards)?"It worked.":"It didn't work."; ?>
  10. do you have some example of what you have pulled!
  11. hummm ftp://username:password@domain.com:aaa.bbb.ccc.ddd/path/to/my/dir/file.txt that aaa.bbb.ccc.ddd should be the port! ie ftp://user:pass@127.0.0.1:21/images/me.jpg :21 isn't needed your best bet is not to guess, paste your line into the browser and see what pops up start at the domain then add to it
  12. fopen fread
  13. if you can use exec/system then yes, if not then your need to create a test script for each, ie connect to the SQL database and select the table to test the SQL, ping the IIS (or even read in a page that only displays the current time, if it displays nothing it failed) etc
  14. As do i.. but in the past i have change a function name to suite its updated usage lol
  15. without knowing what its meant to do.. or how your database is setup.. its not easy... i assume thats a left join but no idea whats next!
  16. the one i wrote took awhile and isn't perfect.. i'm sure theirs a pear solution out their for free
  17. well done can you please click solved (bottom left)
  18. Create a new php script (called image.php) and paste this into it <?php // File and new size $filename = $_GET['img']; //may want to change this to default image path ie "images\".$_GET['img'] $newWidth = $_GET['width']; // Content type header('Content-type: image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $percent = $newWidth / $width; //$newWidth = $newWidth; $newHeight = $height * $percent; // Load $thumb = imagecreatetruecolor($newWidth , $newHeight ); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb); ?> now use this for calling the image <?php echo "<img src='image.php?img=test.jpg&width=400' />"; ?> please note this is untested EDIT: and its setup for jpgs only
  19. heres your problem <?php $SQL = $this->ipsclass->DB->query( "SELECT r.pid,r.uid,r.rating,COUNT(r.rating) as count,p.author_id FROM `ibf_ratings` as r LEFT JOI$ ?>
  20. very true echo 448191 either function display { echo $this->template; } OR echo $template->display();
  21. you could try this Note its untested function mymail($to,$subject,$message,$headers) { // set as global variable global $GLOBAL; // get From address if ( preg_match("/From:.*?[A-Za-z0-9\._%-]+\@[A-Za-z0-9\._%-]+.*/", $headers, $froms) ) { preg_match("/[A-Za-z0-9\._%-]+\@[A-Za-z0-9\._%-]+/", $froms[0], $fromarr); $from = $fromarr[0]; } // Open an SMTP connection $cp = fsockopen ($GLOBAL["SMTP_SERVER"], $GLOBAL["SMTP_PORT"], &$errno, &$errstr, 1); if (!$cp) return "Failed to even make a connection"; $res=fgets($cp,256); if(substr($res,0,3) != "220") return "Failed to connect"; // Say hello... fputs($cp, "HELO ".$GLOBAL["SMTP_SERVER"]."\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "Failed to Introduce"; // perform authentication fputs($cp, "auth login\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "334") return "Failed to Initiate Authentication"; fputs($cp, base64_encode($GLOBAL["SMTP_USERNAME"])."\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "334") return "Failed to Provide Username for Authentication"; fputs($cp, base64_encode($GLOBAL["SMTP_PASSWORD"])."\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "235") return "Failed to Authenticate"; // Mail from... fputs($cp, "MAIL FROM: <$from>\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "MAIL FROM failed"; // Rcpt to... fputs($cp, "RCPT TO: <$to>\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "RCPT TO failed"; // Data... fputs($cp, "DATA\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "354") return "DATA failed"; // Send To:, From:, Subject:, other headers, blank line, message, and finish // with a period on its own line (for end of message) fputs($cp, "To: $to\r\nFrom: $from\r\nSubject: $subject\r\n$headers\r\n\r\n$message\r\n.\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "Message Body Failed"; // ...And time to quit... fputs($cp,"QUIT\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "221") return "QUIT failed"; return true; }
  22. Humm it looks OK, i have to ask.. you are opening index.php right ? and not just going to the folder as html files are normally defaults
  23. These are additional problems! i am not going to do it all for you..
  24. have you tried rawurldecode ? can you post some data from the database so we can see if/how its encoded
  25. Great, Oh can you click solved (bottom left) it save other entering this thread
×
×
  • 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.