Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. If you write the session after you read it, it will stay active until 24 of inactivity ie very basic <?php function SecChk() { session_start(); if($_session['sec'] = true) { $_session['sec'] = true; }else{ $_session['sec'] = false; die("please login"); } } ?>
  2. as a note i am not sure if this is the correct section for this, as its not a "problem"
  3. Use GD Lib, php creates a random code and uses GD lib to write to an image
  4. erm.. what ? also use code tags.. your trying to post to another site that much i got.. whats the problem
  5. define "Security Check" i assume you mean payment ie CC check, yep your need to register for that service, as far as i am aware
  6. <?php $selecttrans = "SELECT * FROM transactions WHERE userid = '" . $_SESSION['cymember'] . "' AND status <> 'Pending' ORDER BY submitted DESC;"; $querytrans = mysql_query($selecttrans); $color = true; while ($rowtrans = mysql_fetch_array($querytrans)) { ?> <tr <?php if ($color) { echo 'bgcolor="#eeeeee"'; $color = !$color; }?>> <td>10/30/06</td> <td>cy52860231015</td> <td>Deposit</td> <td> </td> <td>$500.00</td> <td><b>$1,677.65</b></td> </tr> <?php } ?>
  7. Ahhh Old Header problem,, well we live and we learn Oh can you click solved please (bottom left)
  8. well if imagecreatefromstring isn't working then maybe try building a string from the array ie <?php $newimage = ""; foreach ($imageBytes as $b) { $newimage .= $b; } $img = imagecreatefromstring($newimage); ?> this is a pure guess
  9. Its starting to be fun. I'm just getting past the ??? :'( WTF Huh.. and approaching the
  10. without seeing any code i would guess you did something thing wrong try nl2br($data)
  11. Can you show the jpeg to bytes array code, as it would be a simple matter of reversing it
  12. i assume you mean (?:\d+g?[-\/\\])?\d+g *It works well except only gets the g when i would like it to get the letter or word after the digit (excluding p or P) i tried tweeking your RegEx and ended up with this (?:[\d.,]+[^pP\ \d]?[-\/\\])?[\d.,]+[^pP\ \d]+ Seams to work well About ?:, Ahhh So its nothing todo with making it optional.. OK cool that makes more sence (unless i'm wrong) *Funny thing tried the regex and it worked but not exacly how i wanted it to so i played with it but couldn't get it to work, so i started writing this post and when i wrote whats wrong with it, i read what i wrote and add that rule to the regex and it "seams to work" lol Thanks you WildIbug & c4onastick you both have been a BIG help If no more suggections i'll click solved (as it pretty much is)
  13. Hummm i always use localhost, whats the error your getting? can you supply some code ?
  14. Thanks for helping c4onastick, i think i have a working model i used some of yours and some of mine, Yes my version is long and your version worked but i wanted the values like 100-200g to be pulled in as one, was mainly trail & error but heres my end result ([\d,.]+[^pP\ \d]+)+(([-/\/])[\d,.]+[^pP\ \d])? test data i'm the second chapter but had a small handle on them already the book was for a push.. while this is getting complex (i think maybe too complex for what i am doing) thanx for your help, just reading the process helped alot Oh whats the ?: do again ? i remember reading it but don't think i grasped it
  15. what about this, if the image fails it will display an image saying "Error loading $imgname" use <img src = "testimage.php?file=http://www.yahoo.com/image.jpg"> create script below filename = testimage.php <?php function LoadJpeg($imgname) { $im = @imagecreatefromjpeg($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ $im = imagecreatetruecolor(150, 30); /* Create a black image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } header("Content-Type: image/jpeg"); $img = LoadJpeg($_GET['file']); imagejpeg($img); ?> Hope it helps --MadTechie EDIT you may need to use urlencode & urldecode for passing the URL 4:22am here, i'm off to bed
  16. Ok i have got a good book but i have only read the two chapters and currently i am stumped on this (not in the book), i have a sentance that i need to pull the weight out of, now the weight can be 100g, 3kg 77tons etc now i have assumed that the weight will not end in p or P (i hope) anyways heres the example text i have used and this is the RegEx i have used ([ ]+(\d+[^ pP]+))+([-\//]+\d+[^ pP])? Now it seams to half work but group 2 still finds 100 and 99 in the line below if anyone could help me here i would really appreciate it, also if its not too much to ask a little explanation on how you got it to work i am trying to learn this but this is alittle above me at the moment if this doesn't make sence just say i'll try a re-write Thanks in advance --MadTechie
  17. Servers rule (simple terms) if i connecting via (whatever):// then i am connecting to the outside world (well kinda) this will connect out then loop back either way the server see it as outside so for secuirty reasons its a no no (unless you override via php.ini)
  18. try <?php sql = "SELECT * FROM "'.$_POST['Tableselection'].'" WHERE "'.$_POST['userid'].'" ='1'"; ?> better looking still <?php sql = "SELECT * FROM `{$_POST['Tableselection']}` WHERE `{$_POST['userid']}` ='1';"; ?> EDIT: Updated 2nd one
  19. Congrats 448191 PS Not it
  20. erm the "Change Password" option! in cPanel! http://domain:port/frontend/x/passwd/index.html
  21. only thing i could think of is find something incommon with the files to check for :-\ ie is the first 4k always the same (excluding a few bytes in fixed positions)
  22. Which always makes you wonder why you see statments like
  23. looks like a GET Array! thorpe code will work fine
  24. "PARTLY|MOSTLY+CLOUDY|SUNNY+THUNDERSTORM" = string plain and simple so the array $vws_icon has a key called "PARTLY|MOSTLY+CLOUDY|SUNNY+THUNDERSTORM" (kinda long) with a value of "./icons/" . "$daynight" . "_tstorm.$image_format" $daynight & $image_format will have values that will be pulled inn
  25. what are (s)ppf files ? what program uses them ?
×
×
  • 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.