Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I recently shut down my framework for open public display. atleast until I know OOP/MVC front to back. Instead I have gutted a bunch of classes from Code Igniter, and a few other places, to start carrying classes around instead of just a framework. Right now I have the image library class. I named it class.image.php I required it into the page using require_once when I try to access it's functionality it returns an error. I used <?php $config['image_library'] = 'GD'; $config['source_image'] = "proofs/" . $row['imagename'] . "\""; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->image_lib->resize(); ?> It threw out It's essentially the exact same class that was in code igniter, I eventually plan on learning how to use all of these, and learning how these classes work, then recreating my own sometime in the future. Is there something different I need to do to load a class. I have about 8 different pages of classes (class.file.php, class.array.php and so forth. I have them all required into the page, does that mean I won't be able to use any of those either. What am I doing wrong, thanks.
  2. "Colonela WebSecure2791" was crawling the site of a friend of mine yesterday. Google come's up with nothing. Does anyone know what this is, it showed up in the access log's. Is it a bot, or a crawler if so why isn't there some information atleast about it on google.
  3. http://www.interaktonline.com/Downloads/ I normally do javascript/ajax by hand when I can but there's something. I researched straight syntax highligher extensions for ajax/javascript and there isn't really any. But in dreamweaver go to Edit => Preferences => Code Coloring => Select Javascript => Click edit color scheme. Here you can set it to anything you want which is a lot better than most syntax highlighting because it's custom.
  4. I have learnt something about it. The first part of the url is an id for the user, so I am supposing he has a user id for his account, I am about to speak with him about it. Thanks.
  5. Ah ok, thanks for the clarification and for taking the time to answer. Thanks again.
  6. Is this some form of Amazon API <iframe src="http://rcm.amazon.com/e/cm?t=freerollers-20&o=1&p=8&l=as1&asins=1580421768&fc1=000000&IS2=1&lt1=_blank&lc1=0000ff&bc1=000000&bg1=ffffff&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe> There is an rcm in the url. visiting rcm.amazon.com it says you are forbidden into it. What this does is on a site I am working on it opens up a small box that shows the location of the book. If you visit that url directly you will see a book picture there, it's like that on all of them. Does anyone know how to get access to this API or be able to take any book or something and formulate this type of link. I have someone with editing capabilities, he will have no idea on how to create these links, I wanted to do them behind the scenes somehow, or have somewhere he can go to get the link needed for whatever book he wants to put on.
  7. Yes, I have just thought of that. On top of that, the word all is reserved. I had to put back ticks for both the words "limit, and all". Now it works, thanks.
  8. So it's basically along the same line's as search and replace, but in a standardized format. For example So the first argument is going to be the original message, then the second argument basically find's/replaces them into the slots. Is it subsequent for each one (in order). sprintf("Hello, today we %s are going to %s and fall into the %s", "going", "try", "water"); That will basically create Hello, today we are going to try and fall into water. If this is true then I understand it's use. However I still don't understand it's purpose, you mentioned "convenient" meaning "suited to your comfort or purpose or needs, easy to reach" which would mean it's an easier way to do queries. When I looked over the programming from this other developer and saw this, I was wondering what it was and now I understand. However I don't fully understand the different in using this over standard queries, or using this over OOP for standard queries. Is it mostly just related to personal style, or are there other reason's why this is considered "convenient". Thank you so far for the advice.
  9. <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insert = "INSERT INTO books (author, name, link, description, holdem, razz, omaha, omahahilo, stud, studhilo, draw, other, tournaments, limit, nolimit, potlimit, year, all) VALUES ('" . GetSQLValueString($_POST['author'], "text") . "', '" . GetSQLValueString($_POST['name'], "text") . "', '" . GetSQLValueString($_POST['link'], "text") . "', '" . GetSQLValueString($_POST['description'], "text") . "', '" . GetSQLValueString($_POST['holdem'], "int") . "', '" . GetSQLValueString($_POST['razz'], "int") . "', '" . GetSQLValueString($_POST['omaha'], "int") . "', '" . GetSQLValueString($_POST['omahahilo'], "int") . "', '" . GetSQLValueString($_POST['stud'], "int") . "', '" . GetSQLValueString($_POST['studhilo'], "int") . "', '" . GetSQLValueString($_POST['draw'], "int") . "', '" . GetSQLValueString($_POST['other'], "int") . "', '" . GetSQLValueString($_POST['tournaments'], "int") . "', '" . GetSQLValueString($_POST['limit'], "int") . "', '" . GetSQLValueString($_POST['nolimit'], "int") . "', '" . GetSQLValueString($_POST['potlimit'], "int") . "', '" . GetSQLValueString($_POST['year'], "text") . "', '" . GetSQLValueString($_POST['all'], "int") . "');"; if (mysql_query($insert)) { echo "Entered successfully"; }else { echo "Problem Entering Book"; echo mysql_error(); echo "<br />"; echo $insert; } } ?> It's returning The thing is I went over the sql query multiple time's and it's "looking" perfect. The query echo's out as shown INSERT INTO books (author, name, link, description, holdem, razz, omaha, omahahilo, stud, studhilo, draw, other, tournaments, limit, nolimit, potlimit, year, all) VALUES ('Joyel Puryear', 'Testing the book system', 'http://www.amazon.com', 'This is a test description', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '0', '1', '2006', '1'); I see no issue's, especially around the area it mentions. Any advice?
  10. http://us.php.net/sprintf Can someone please explain this to me. I saw a format I never saw before, it looked like the following. <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO books (author, name, link, category) VALUES (%s, %s, %s, %s)", GetSQLValueString($_POST['author'], "text"), GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['link'], "text"), GetSQLValueString($_POST['description'], "text"), GetSQLValueString($_POST['holdem'], "int"), GetSQLValueString($_POST['razz'], "int"), GetSQLValueString($_POST['omaha'], "int"), GetSQLValueString($_POST['omahahilo'], "int"), GetSQLValueString($_POST['stud'], "int"), GetSQLValueString($_POST['studhilo'], "int"), GetSQLValueString($_POST['draw'], "int"), GetSQLValueString($_POST['other'], "int"), GetSQLValueString($_POST['tournaments'], "int"), GetSQLValueString($_POST['limit'], "int"), GetSQLValueString($_POST['nolimit'], "int"), GetSQLValueString($_POST['potlimit'], "int"), GetSQLValueString($_POST['year'], "text"), GetSQLValueString($_POST['all'], "int")); $Result1 = mysql_query($insertSQL,$dbc) or die(mysql_error()); } ?> I understand most of that. It's a query it's just formatted a way I never noticed. Can someone exlpain the part about sprintf() and what it's doing. I don't understand it's purposes.
  11. Well I know I want to create my own. It's just coming to terms with these classes, I have been getting into them a lot lately. Especially PHPMailer. I have been using it, and notice it takes half the time to do 4 time's more advanced mailings with this, than with Anything else. I am trying to figure out if I should just use the classes that I end up running across I like, or just do a mixture of the both. It's not like i have time to sit down and create classes this advanced, or even have the current skill level too. However I want an alternative. Hmm, thanks for the feedback.
  12. When it comes to development and trying to make things go smoother, I was thinking about classes. Is it best to create my own classes for things, or just find classes. Like for example for emails. I have been recommended form mailer class. Is it easier to create one, or use that one. What situations should I create my own classes, and what situations should I use other people's.
  13. I always set the permissions on the folder they are getting uploaded into to (777). Is this safe, or is there another setting that would be more secure, that is more recommended. THat will still allow files to be put in the folder by posters, accessed by viewers, and deleted by admin. Is there a better setting than 777, let me know thanks.
  14. OK, I have a client. They have a space they want on a site I am building for them called "demo". This is going to be something (they aren't sure yet so I am exploring options), they think power point presentation, or recorded video, or something explaining/showing how to use the site. Power point sounded like a good idea, because I can pass it on to them, they can create it. However once they give me the file for power point, (the presentation), is it going to automatically launch the Power Point on the person's computer, or can the presentation play on the server. Or something similar.
  15. Is there a kind of web software that a person can use to build like an on line presentation (demo use) of something, then put it on a site, so it runs on there computer. Or if someone creates a power point presentation and you leave a link for them to click on it, will it open power point on there computer.
  16. I went ahead and turned it down, it was for around less than 700, for that and a full classified ad system (custom, he requested custom), and I asked a friend of mine, my original quote of 1800 was denied, and we negotiated to lower, but I backed out. Thanks for the advice ,I figured that it would be too difficult to do that for it to be worth it (especially within that price), thanks again.
  17. Thanks for that advice, it was appreciated, thanks for the explanation as well.
  18. I think that would be a great idea, and leave it open so anyone can post links to directories and/or search engines they know of. Eventually there could be a huge list, this could also bring more traffic to phpfreaks.com if there is a huge list of places to basically advertise (search engines, and directories), I know that will bring me to the post every single time I start promoting a website. I can think of like 3-4 directories I would want to add already. That would be a great idea, I agree.
  19. I have a client who wants a custom classified ad system. Which is fine, however he mentioned he wanted the ability for people to be able to post those ads also with a cellphone. I think he means text messaging or something, what i was thinking was wondering how to arrange this. • The ability for users to post information through there cell phones Is this going to be hard or easy, where do I look for something to allow me to set that up.
  20. I recommend, and like Linux/Unix more than windows. However That is not true about windows not supporting PHP as well. If you have a windows system, and have Apache installed, with php/mysql installed, everything works the same. Except some file handling might be slightly different (some) as well as there are no permissions for the ftp (You can't set permissions in Windows. Other than that it runs primarily the same for PHP, I have also noticed (this might be co-incidence), but Linux and Unix servers tend to run considerably faster than Windows. I have noticed windows servers, and linux/unix seem to have differences in speed. There is one thing I like (ONE) about windows more than linux/unix. On windows, generally, when it comes to web hosting you can run .exe files. So for example, like there is a program called SAM Broadcaster, it can only be installed on windows. A lot of other stuff (hordemail), and others have EXE executables that "I think" can only be run on windows because they say windows system only, and some web hosts even let you execute exe files with there supervision, which can be very helpful if you are in need of some really high powered programs. The only other thing I like about windows, is if you get into remove desktop on your server (managed, dedicated or one you have full access to), I understand it better. I never owned a Linux/Unix system, I have a windows operating system for work on PC, however on a server I prefer linux/unix better, I also seem to get around a little better in there command line (Windows always makes me go slower). It's a toss up in the end. I would always go with Unix/Linux given the option but I wouldn't complain if windows was needed (as long as I could use Apache, I hate IIS with a passion I tried messing with it once before.
  21. Around 20-40 per hour at entry level. Depending on what part of the country your in.
  22. Personal Programmer Assistant is also getting redone. I want all my personal sites to be custom built when I have time, I am redoing freelancebusinessman.com and ppassistant.com The idea behind the network site was partially for me, and partially to keep my site's connected easily. I wanted something simple, something (non-professional necessarily), just something that is a network. Nothing really special, I just didn't want to do it on a plain white page, which was what I was originally going to do, until I wanted to pour slightly more time into it.
  23. In my opinion be careful about getting a dedicated server. Most of the time it's about what you need. If you have a very big, very important project (site, or application) that means a lot to you. Or if you have a BUNCH of stuff that you need, then go for dedicated or managed. (Or vps). However if it's a simple personal site, or small business site I wouldn't waste the money. Spending 100 dollars per month that won't even pay for itself. Generally if you are paying 20-100 dollars a month for a dedicated server it's not even really dedicated. The only exception is to have your dedicated server ON your computer, and run it, but then your computer has to remain on all the time, for it to be live.
×
×
  • 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.