Jump to content

2bigpigs

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by 2bigpigs

  1. I like to time my scripts' execution so i get an idea of whether it's my connection or my script that's being slow. Also, By limit on execution time, It means the time before the script times out and is killed. I can't find the heliohost limit, Maybe it doesn't have one?
  2. Or part of the OS which lets you communicate with the kernel ( From what i remember from school years ago )
  3. Same to you I've got a huge list of things to do when the exams are over...
  4. But that may require me to know how large the user's screen is going to be or we could have a lot of wasted space on larger screens.. It's a good idea that's bound to work but i don't mind trying all sorts of stuff to get this to work. Plus the more independent it is, the easier it is for me to change stuff around without breaking. I was planning on adding fonts and font-sizes after my exams ( Which would be in may ) I had another approach: Underline the text. But that stops when the text ends. Is there a way to stretch it across ( using a HUGE tab ( "\t" ) ) or right aligning a blank space so that it stretches? @Anush: I don't code much anymore. It's usually half an hour at night.
  5. Actually, I've switched from span to using a table and lists. My aim is to give a ruled-book feel to the page so it's easier to read / more original. And my method isn't working properly, Here's an example page: http://www.slamsite.....php?entry_id=1 The lines appear only after a new line (<br/>) but not if the line was wrapped ( which is understandable since it's a border-bottom). It messes up on 'Favorite song' and 'Favorite Quote'. If you'll look at the site banner, You can see what i'm aiming for The site is still very much in development but i'd like to get this part right. This is the code what i'm currently using: CSS: The whole background, Fields and data are all dynamic so they'll vary from page to page.
  6. No, I don't think they're making weapons. Not with the intent of keeping an arsenal anyway. Nope. The US warned Israel against this. I seriously hope they won't attack Iran. Only if they're forced to.
  7. I've been searching for a while but haven't found what i need. I'd like to achieve something like this: ( ^ Cheap trick . I hope i was clear enough. I really appreciate all the help ) Edit: Temporary fix i found for myself: li {width:100%; border-bottom-style:solid; border-bottom-width:1px; list-style-type: none; padding-bottom:4px; border-bottom-color:black; } This is a pain since i need PHP to wrap each line in <li>
  8. You could go for some forums software and work on that. It'll save you a lot of trouble in coding and they're rather easy to customize.
  9. I'm running wamp on a windows XP 1.86 Ghz Core 2 duo 1.5 GB RAM ( Started off with 512 ). It runs great and all my scripts are tested on there before any uploads are done. Slow upload rates will affect you depending on what you'll be hosting. My pages are usually a lot of html with an occassional image. I think it works okay for people outside the LAN. I usually use it as a test-ground for my scripts so no network involved, Just localhost.
  10. Thanks. I was wondering whether heliohost had a preset include path for my files. If it did, Then i could easily move hosts or subdomains without having to worry too much. Right now i have one global_config which is in the same directory as the pages + a classes folder. Thanks for your support. I have my answer
  11. A bit on topic: I see a lot of activity in the user creation log of the wiki. Are all of those regular members or are they bots?
  12. I added a parked domain today on Johnny. No trouble there New domain: www.slamsite.tk Original heliohost subdomain: brickhouse.heliohost.org
  13. I wanted to avoid that. It makes everything ugly + i have different folders. If i can have an include path higher up ( Above public_html so nobody accesses the classes directly (even though it doesn't matter) ) i'd like to use it. I'm new to all this
  14. I'd like to include a few files in my scripts. On WAMP, I've been using the document root as include path but i don't know how to do it here. Ideally, I'd have this: <!--?php require_once('global.inc.php'); require_once('myclass.inc.php'); Is there a specific folder that i should put my includes in? I get this error: One more question: Will using too many includes (3) slow down execution by a lot?
  15. Yeah. That was strange though. I got the suspended page one second, Finished posting it and it worked :| Maybe i got mixed up and clicked someone else's link when i was trying to find out what was wrong. Progress is slow though. FTP keeps getting disconnected.
  16. Edit: I'm not sure i'm suspended. I got an error page saying something like: You're seeing this page because: Too much resources, Inactivity, Breaking ToS But i seem to have access again. Sorry to bother you Username: bigpig Server: Johnny HelioHost main domain: brickhouse.heliohost.org I think i know why I did a DB export through PHPmyadmin. It wasn't that big a database ( 18 KB ) so i didn't think it would be much of a problem. I'm sorry. I know you're a free host and have many sites hosted on the servers. I was going to remove the DB completely and upload a new project. I guess i was asking too much of poor old johnny Thank you 2bigpigs
  17. I use programmer's notepad. Serves my purpose perfectly till now. It does highlighting and remembers my function arguments for me so i've been quite impressed by it.
  18. To know your problem for sure, You can use mysql_error(); if( ! mysql_query('your query'); die(mysql_error());
  19. Ah, Okay. Like i said, I'm still a beginner and have lots to learn. Thanks for explaining it to me
  20. Looks good. It's not that big an effort what you gain. Seriously, You should md5 them. All you have to do is pass the string through the md5 function and you'll get it. To make it even more secure, You can concatenate a random string to the password too. All you have to do is md5 the login password and compare it against the stored hash in your database] Eg: //without salt $password = md5($_POST['password']); //with salt $password= md5( $_POST['password'] . 'my secret salt' ); You don't even have to escape it since the md5 can't contain any dangerous characters. A reason to use salt is because of the way md5s are 'decrypted' . They're not actually decrypted but are compared against a huge database of common strings and their hashes ( Admins, Could you confirm? ). So using a secret salt would change the hash would protect it from that approach too. Is that to me?If it is, Sure. I'm pretty bored at home and have no ongoing projects. I'm still a beginner though Question about the script: You're going to run this script when you're logged into CPanel, Right? @xaav: I've tried using booleans in mysql, It never worked properly for me Any tips?
  21. Escaping means to escape all the characters that could cause trouble. if you were to have a piece of code //without escaping quotes echo ' Hello, My name is O'Reilly It's nice to meet you ' ; You'll get an error here because the string is broken due to the single quotes (') in O'Reilly and it's. The highlighter makes this problem obvious here. This is a problem in every programming language and a lot of them escape these characters in the same way. By preceeding them with a \ Eg: echo ' Hello, My name is O\'Reilly It\'s nice to meet you ' ; Escaping information you're going to use in a query is especially important because, if you don't escape it, You leave your queries vulnerable to SQL injection. Look at this script here: $strCheckUserSQL = "SELECT * FROM subs WHERE username='$username'"; The string in $_POST['username'] is substituted in place of $username. If my username were to contain a single quote (Like O' Reilly) You'd have an invalide query which looks like this. "SELECT * FROM subs WHERE username='O' Reilly"; This doesn't seem that serious but i could easily add SQL commands into my username to make your query execute commands that i want it to. I could steal all your passwords this way. To prevent SQL injection (Or atleast make it really difficult to do), You can use the mysql_real_escape_string() function. It requires you to have a connection to the database but you already have that. //Like this $username = mysql_real_escape_string( $_POST['username'] ); I guess it's better that i don't post the string i'd enter to get your passwords. Here's an example i wrote up if you're interested in learning what SQL injection is: http://ping-localhos...brickhouse.html Also, You could md5 encrypt your passwords. A lot of identity theft happens because people use the same passwords on many sites. So if i were to steal passwords from your sites, I'd try them on every other site too.
  22. I don't think you need to use any of those if you just want to send a mail (Like for email validation or password recovery). Just use the mail function with the required arguments and you should be fine. $to='myemail@gmail.com'; $headers = 'From: testing@yourdomain.org'; $subject = "Test"; $message = 'Hello! <body of the message>'; if(mail($to,$subject,$message,$headers)) echo 'Mail sent' ;//Doesn't mean it was received properly else echo 'Error sending the mail'; You can add a 'Reply-To' in your headers so that they respond to an email address which exists (you can create one in your Cpanel' Eg: $headers = 'From: noreply@mydomain.org' . "\r\n" . 'Reply-To: webmaster@mydomain.org' . "\r\n";
  23. Kinda forgot about that yesterday Well, Atleast i know what to do if i do it again later
  24. I created a database in PHPMyadmin. It doesn't show up in CPanel and PHPMyadmin doesn't let me DROP the database. When i try DROP DATABASE db_name; I get an error saying 'DROP DATABSE statements are not allowed.' Or if there was a way i could assign a user privileges to this database. That would be fine too. Help? Edit: Got around it by a comment. DROP /**/ DATABASE db_name;. I guess i should have tried it out myself before asking. Sorry
×
×
  • Create New...