Jump to content

R0bb0b

Members
  • Posts

    127
  • Joined

  • Last visited

    Never

About R0bb0b

  • Birthday 12/27/1976

Profile Information

  • Gender
    Male
  • Location
    AZ, USA

R0bb0b's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. do you echo your javascript before or after the html? The way you have inserted the javascript, not in a function or anything like that, it is going to run right when the browser processes it, so if you have it before your div has been parsed then you will get an undefined object. And Zurev does have a point, I have to assume that this is just a proof of concept type thing.
  2. I don't see any reason why that wouldn't work, can you provide some of your html as well?
  3. this is very basic, if you are taking user input you should probably add some field validation but here you go: <?php $strOutPut = ""; if(isset($_POST['txtInput']) && trim($_POST['txtInput']) != "") { $arrLines = explode("\n", str_replace("\r", "", $_POST['txtInput'])); array_walk($arrLines, "trim"); foreach($arrLines as &$value) { $strOutPut .= str_replace(" ", "-", $value) . "\t" . $value . "\n"; } $strOutPut = substr($strOutPut, 0, -1); $fp = fopen('path/to/file.txt', 'w'); fwrite($fp, $strOutPut); fclose($fp); } ?> <html> <head> </head> <body> <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> <textarea name="txtInput" style="width:500px; height:300px;"><?php echo trim($strOutPut) != ""?$strOutPut:""; ?></textarea><br /> <input type="submit" name="btnSubmit" value="submit" /> </form> </body> </html>
  4. This also may be a windows socket thing, which I don't use, but I do see something that you also might find useful here http://www.psychostats.com/forums/index.php?showtopic=20761&st=0&p=111863&&do=findComment&comment=111863
  5. I don't recognize that error but I can say this: the url "http://127.0.0.1/ddos/udp.php?ip=127.0.0.1?port=81?time=10" is not valid. I should look like this http://127.0.0.1/ddos/udp.php?ip=127.0.0.1&port=81&time=10
  6. try to urlencode the entire xml string like so: foreach($fields as $key=>$value) { $fields_string .= $key.'='.urlencode($value).'&'; }
  7. I got it, you need to call the function <?php pdf_set_parameter($pdf, "escapesequence", "true"); ?> after you instantiate the pdf object and then you can use a whole range of encoded characters. After I set the parameter "escapesequence" as "true" I could then use <?php str_replace("<", "\\074", $noterow['note']); ?>
  8. <?php $textflow=PDF_create_textflow($pdf, $macros.$doccontent, "fontname=Times-Roman fontsize=10 encoding=winansi leading=118%"); PDF_fit_textflow($pdf, $textflow, 70, 50, 550, 750, "showborder=false"); PDF_delete_textflow($pdf, $textflow); ?> I have tried "<" and it just displays as "<" and not "<".
  9. I am using pdflib and am getting this error "Fatal error: Uncaught exception 'PDFlibException' with message 'Unknown macro '&' in Textflow' in /usr/local/apache2/azfmc/html/cases/printdn.php:478 Stack trace: #0 /usr/local/apache2/azfmc/html/cases/printdn.php(478): pdf_create_textflow(Resource id #5, '/usr/local/apache2/azfmc/html/cases/printdn.php on line 478" What it is doing is finding a "<" in the text and considering that to be the start of a macro. What can I replace "<" with that will show up as "<" in a pdflib pdf document that won't confuse the parser? I've already looked through my dingbat chart and don't see it there.
  10. That's just one example where there are dozens. My guess is that somewhere in the PDO class mysql_real_escape_string() is already being used. It must single quote the values too, otherwise that should work.
  11. OK, but I think you get the point. How are you going to validate that ':id' is an integer if you do validate that ':id' is an integer. I don't see how this protects against sql injection.
  12. I don't see a difference between this: <?php $pquery=$dbh->prepare("SELECT * FROM product WHERE product_name='bananna' and category_id=1 and 1=1"); ?> and this: <?php $pquery=$dbh->prepare('SELECT * FROM product WHERE product_name=:name and category_id=:id'); $pquery->execute(array( ':name'=>$name, ':id'=>'1 and 1=1' )); ?> they would produce the same results
  13. It's certainly worth looking at if you want to. I would preserve this script you have here by renaming it to something like file.php.bak and then make the other the primary file for the time being and see if you can get that one working. But eventually you're going to want to stick with something.
  14. Yes, the terminal window. This looks like a valid sql statement to me so I am assuming that some of the columns like "id" and "name" and possibly the tablename "info" may be reserved words in mysql so require must be quoted with ``.
×
×
  • 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.