Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. you could use ini_set('sendmail_from', 'my@account');
  2. Yeah see examples posted!!.. its not hard.. infact most would say its kinda simple!
  3. <?php $data = "hello you bad1, how the bad2"; $Bad= array("bad1", "bad2", "bad3"); $Replace = array("***", "***", "***"); $data = str_ireplace($Bad, $Replace, $data); ?> If you want advanced (more flexable) filtering then RegEx would be better, but a little slower RegEx would probably be my choice, as you can catch things which would noramlly require a few lines use any other method simple RegEx Example <?php $data = 'hello you bad1, how the bad2'; $patterns[] = '/bad1/i'; $replacements[] = '***'; $patterns[] = '/bad2/i'; $replacements[] = '***'; $patterns[] = '/f??k/i'; $replacements[] = '***'; $data = preg_replace($patterns, $replacements, $data); ?> That will be more complex and much slower..
  4. probably using http://uk2.php.net/highlight-string and http://uk2.php.net/manual/en/function.substr-compare.php
  5. example <?php echo "Data=".$_GET['data']; echo "<br>"; echo "ID=".$_GET['id']; $newid = ($_GET['id'] + 1); echo "<a href='example1.php?id=$newid&data=test'>test</a>"; ?>
  6. you can use any, i just had that installed on this machine, their are better but i got used to this another good one for 90% of text editing is Notepad++ (google it)
  7. $_POST = POST Requests (normally from a form) $_GET= Get Requests (from the URL) or a form $_REQUEST Either Get or Post Requests
  8. LOL, thats sounds too much like work to me, i copied the code in Dreamweaver, then done a find all on {, in the list i reviewed the line, (to check if any were commented out) this also gave me the total number, i then did the same for the }
  9. Wrong section.. try HTML/CSS section or the pointless section
  10. erm.. like this echo $o[0]; other example <?php echo '<script language="javascript">alert("test");</script>'; ?>
  11. i think your missing a comma (,) teng84
  12. ajax on a timer would work
  13. the code should be <?php if ($trade['item1'] != "0"){ $item1 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item1']}")); $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item1['itemid']}")); } if ($trade['item2'] != "0"){ $item2 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item2']}")); $r_item_array2 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item2['itemid']}")); } if ($trade['item3'] != "0"){ $item3 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item3']}")); $r_item_array3 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item3['itemid']}")); } if ($trade['item4'] != "0"){ $item4 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item4']}")); $r_item_array4 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item4['itemid']}")); } if ($trade['item5'] != "0"){ $item5 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item5']}")); $r_item_array5 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item5['itemid']}")); } if ($trade['item6'] != "0"){ $item6 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item6']}")); $r_item_array6 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item6['itemid']}")); } ?>
  14. can you re-post the updated first code, also is ID a char or an int ?
  15. change <?php $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`='$item1[itemid]'")); ?> to <?php $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`='{$item1['itemid']}'")); ?> on all items
  16. the logic (mainly the if statements) if you can find values that work and values that do not work.. then you can workout the problem.. currently we need more info, to workout the problem, i suggest looking closely at the input..
  17. remove the :'s
  18. remove the user folder, and try my script again
  19. But PayPal has an API, for this... i am so suspicious, because i am the one after you... Muahahha (just kidding) i'm not suspicious, i am just trying to understand the problem..
  20. It will return the data from that form.. so you could do this $html= curl_exec($ch); echo $html; i think the big question is why your taking this route!
  21. the basic concept is this (note the //heres) <?php //FIELD HERE $post_data = array( "url" => "http://pn-network.net/sprites/tc_012_2.png", "fileupload" => "http://pn-network.net/sprites/tc_012_2.png", "MAX_FILE_SIZE" => "13145728", "refer" => "", "brand" => "", ); $ch = curl_init();//OF COURSE curl_setopt($ch, CURLOPT_URL, "http://www.imageshack.us/transload.php"); //HERE curl_setopt($ch, CURLOPT_MAXREDIRS, 10); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_POST, true); //HERE curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); //HERE curl_exec($ch);//OF COURSE curl_close($ch);//OF COURSE ?>
  22. one of a few http://www.phpfreaks.com/forums/index.php/topic,161386.0.html
  23. 2 ways, 1. read CURL documentation 2. search the forum (i have written the script on here before).
  24. LOL, Can you click topic solved please (bottom left)
×
×
  • 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.