Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. You must add ob_start at the top of your PHP script (above any whitespace) to rectify the problem. It starts the output buffer. <?php ob_start(); //start the output buffer, at the top! ?> [html code..] <?php header('Location:...');// Works now ?> EDIT: Place it ABOVE any of your HTML code, ob_start at top, close the tag and then you can output HTML.
  2. Your code obviously is not ethical. Data theft is wrong, You could get the mob after you!
  3. "show if it passes the file size aloud". 0 in settings usually means infinite, so it will never call the JS function.
  4. I'm not sure if this will fix it, But place ob_start at the TOP of your php code, before any white space. This may rectify the header issues, since it starts an output buffer. <?php ob_start(); //Start output buffer require_once 'config.php';
  5. I'm not 100% sure what you mean, but yes you can put those links into an e-mail and it will work with the subject etc. Just note that there's a possibility of it thinking it's spam if you don't set MIME/iso headers, SMTP traps are greedy.
  6. Greasemonkey uses JAVASCRIPT to modify a page or domain. This is not the right forum! Shouldn't be hard with just a little JS practise though.
  7. It'd be helpful if you showed us where that line was, look at it. Either you're missing an endline or there is a string defined where the parameters do not allow.
  8. I've seen this problem too on my site. I noticed, when the FROM address is too long, name or address ( such as name00000000@mysite.com ) It'll go to spam, but if it short, it wouldn't. As for headers, yours are 100% fine. There is no 'header'. Webhosts us a single SMTP server most of the time, and if that is blacklisted (another site on host sent spam) than yours is affected as well, possibly not being able to be whitelisted.
  9. Using firebug it tells me the DIV is called ad_block. Use some CSS to hide that, or disable ads from your wordpress panel. May be the theme broken as well, I'm not sure if that theme is 100% compatible if it came like that.
  10. I thought so, yeah, I know there are plenty of snippits to help clean HTML and such out of it. I think I'm pretty set off, no injection and I can use a character regex to only allow 0-9-a-z and a few basic allowable tags.
  11. I am writing a simple script to let people upload 'pages' of their own content, be it simply a few bits of HTML, pictures and whatnot, and recieve their own url.. I've without testing, wrote this part of the script to clean the input, are there major security risks? function cleanInput($input) { $search = array( '@<script[^>]*?>.*?</script>@si', // Strip out javascript ); $output = preg_replace($search, '', $input); return $output; } function sanitize($input) { if (is_array($input)) { foreach($input as $var=>$val) { $output[$var] = sanitize($val); } } else { if (get_magic_quotes_gpc()) { $input = stripslashes($input); } $input = cleanInput($input); $output = mysql_real_escape_string($input); } return $output; } //Define date for entry $date = date("Y-m-d"); //clean input $_title = sanitize(cleaninput($_POST['title'])); $_uid = sanitize(cleaninput($_POST['uid'])); $_desc = sanitize(cleaninput($_POST['desc'])); $_content = sanitize(cleaninput($_POST['content'])); // Insert a row of information into the table with function function insert($title, $uid, $desc, $date, $content) { mysql_query("INSERT INTO pageit (title, userid, `desc`, dateadded, content) VALUES('"._$title."','".$_uid."','".$_desc."','".$date."','".$_content."') ") or die(mysql_error()); } // Do the insert with the cleaned data! insert($_title, $_uid, $_desc, $date, $_content); //Done script stuff for now..
  12. Is the image a solid colour?
  13. You can have code like if ($_GET['game']=='game1') { echo "<embed game1../>"; }elseif (.....) { echo "Game2: <embed...>"; } in successive IF statements like that, or use a database.
  14. Use the GD library for this, it's able to decompile images but to find the 'main' hex attribute it may be a little harder, you may need to break into algorithms for that.
  15. What do you mean? You must then add into your .htaccess something along the lines of: AddType application/x-httpd-php .php .html To be able to parse PHP code. This is standard for most new PHP installations if that is what you meant.
  16. Thank you so much! I actually thought 'desc' was a reserved name, and accute accents were to define them. Thanks.
  17. I have this code that I use to create the tables for my project of a video system.. Basically I want these fields, but it claims I use invalid syntax near desc/dateadded etc.. But I copied off an example and I can't see what's wrong. // Create a MySQL table in the selected database mysql_query("CREATE TABLE video( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), title VARCHAR(30), desc VARCHAR(200), dateadded date, filepath VARCHAR(200), previewpic VARCHAR(200) )") or die(mysql_error()); echo "Table Created!"; Is that how I'd create an entry for a date etc? I'm not sure why the syntax is wrong.
  18. I'm just making a simple video system for my site with one template, I need the following items for each video.. so I can make it simple like video.php?id=1 (or md5 etc.). Here's what I need stored: Meta tag description Meta tag title Path to video file (/v/bla.flv) Just those for now, how do I insert and display them, so I can use a single template for my videos? This is all I need to know and i'll be happy!
  19. I was wondering why it was down!. Only thing I can see is the tags not creating a new line before the codeblock like before. A lot of posts are a bit messy now. Here's example: text .. [ph[b]p[/b]]...[/ph[b]p[/b]] =
  20. Use a really simple function called isset such as.. here: if (!isset($_POST['username']) //If it isn't set { echo "Error. Please enter a username"; } else { echo "Welcome $_POST['user'] !"; }
  21. Is the "The video details cannot be retrieved." from Youtube or your code? If it's from your code then. 1) Find the error, and WHY it was triggered. 2) work your code/logic around it. If you can't, find then do the same with your other functions. It doesn't look that hard to solve.
  22. I believe you would need to use the header such as: Connection: Keep-alive. If you send a Content-Length header with your PHP script, Apache will be able to keep the connection open and maintain keep-alive without appending ": close" to the end thus breaking it..
  23. Your error reporting lacks the correct error reporting, ironically. "Cannot be retrieved.." is not helpful. Debug your code, add checks on every bit of the code, ESPECIALLY seeing if the video path EXISTS, as youtube, bans certain hosts and changes its locations/videos at will. It's most likely some simple parsing problem though..
  24. It's easier to learn code, than to write code. It's just pointless.
  25. Technically you should not use or die(), As you should read in Daniel0's sig/tut. But yes you need it to be on the same line, closing the line will not allow the logic to parse and will just throw an error in the end.
×
×
  • 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.