sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
Sexy Halloween Costumes and Lingerie Website
sKunKbad replied to Colton.Wagner's topic in Website Critique
... and the 3% are probably bots anyways ... -
In the code you have provided, $token will always be false, null, or empty.
-
You should look for tutorials on simpleXML. There is nothing hard about doing what you want to do, and I can help you, but I'd feel bad about writing code for you without you trying. Maybe somebody else will write code for you, but unless you learn some php, then you'd expect people to always be writing your code/ simpleXML is REALLY simple, so give it a shot.
-
I use CodeIgniter, and have for a little over a year. It has really helped clean up my code, which used to be a bunch of procedural garbage. I didn't have a lot of experience with OOP before using CodeIgniter and Kohana, and I suppose OOP alone could have helped me clean up my code, but OOP was hard for me to grasp without having a reason, and the two PHP frameworks I mentioned are both a bunch of OOP, so my reason for using a lot more OOP was to learn the frameworks. MVC also helps organize my code, which may not be the reason for MVC, but it sure does make things more organized. Another thing that helped clean up my code is that I decided to follow CodeIgniter's Style Guide. The Style Guide is here: http://codeigniter.com/user_guide/general/styleguide.html One thing that I like about frameworks is that other people are constantly looking at the framework, finding bugs that get fixed, finding security issues that get fixed, etc. If I was to make my own "framework", then who will fix my bugs and security issues? Me. Well, me if I find them. I will say that because I've been using frameworks for all my projects, some standard PHP knowledge of mine has sort of been tossed in the trash. For instance, all of the mysql db connection stuff, as well as queries, updates, inserts, etc. have now been replaced by Active Record and a config file. I could babble on for a while about CodeIgniter and my experience with frameworks. I think for super small projects I would not use CodeIgniter, but I use it for almost everything. It is good and supposedly one of the fastest frameworks.
-
What do your rewrite rules look like?
-
It's hard to see what's going on without some HTML. If you'll supply some, I'll be happy to take a look at what you're working on.
-
They either flunked English in high school, or they aren't from the US. Very poorly written letter...
-
I had tried different doctypes, and stripped all extra code out. Narrowed it down to what you see here: http://www.tv-sewingcenter.com/test.html My doctype is the new HTML5 doctype, which supposedly works just fine, and it didn't make a difference what I changed the doctype to, so that wasn't the problem. In the end, I just applied a negative margin to the .tab-on and .tab-off divs, and that cleared things up for IE8 x64. Seems like a bit of a hack, but then I guess that's what IE is all about.
-
More info: seems like this is only happening in the Windows 7 x64 IE8.
-
Posting here in HTML, but don't know what is causing this display issue in IE8. Live page is located at http://www.tv-sewingcenter.com It only seems to happen on the home page. I've tested this on a few computers and multiple browsers, so it seems that it is only IE8. I don't have compatibility mode on, but I don't consider this a fix. I've attached an image that shows the display problem. Little vertical lines between menu tabs. If I hover over the tabs, then the lines go away. If I scroll down the page and then come back, the lines go away. If I go to another page and then come back, the lines go away. Any ideas? [attachment deleted by admin]
-
look at this: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
-
All you have to do is use the php date() function to get the current time, formatted whatever way you like... See the documentation at php.net. There are many examples.
-
What have you tried? cURL? Did you use the cookie jar?
-
$this->input->post('field1'); input does not indicate an input element, but rather a class that you are calling the post method from. This means that even though the post value came from a select element, the value of that element was filtered and retrieved through the input class/post method.
-
Try this: <?php $openedfile = file("myfile.txt"); sort($openedfile); // foreach($openedfile as $key => $newpick) { echo '<a href="/editpage.php?request=' . $_SESSION['record_to_chgange'] . '&newcat=' . $newpick . '" target="_parent">' . $newpick . '</a>'; echo "<br>"; }
-
Is it possible to tell 2 different computers apart?
sKunKbad replied to cunoodle2's topic in PHP Coding Help
No, there isn't a way to identify a specific computer other than IP address, cookies, browser detection, OS detection, or a combination of all of these, and none can be trusted. -
I was asking the same questions when I started in with Kohana. I couldn't really see the benefit of MVC, I had already been using my own "framework". I decided to use Kohana for a project, just to test it out. For me, the best thing was that it really cleaned up my code, and helped organize all of the parts of code, so that it was so much easier to see what was going on when I came back to the code after a week or two. I eventually switched to CodeIgniter because, at least at the time, it had way better documentation and the community forum was active with people that actually wanted to help. I think if you start using CodeIgniter, you will look back at this thread in 6 months, and wonder how you ever coded without it. It makes a huge improvement in your daily coding life.
-
Yes, I like it better. Now you just need a contact form.
-
Using Wordpress for backend edits only not website?
sKunKbad replied to Danestar's topic in Frameworks
Why not use something like CushyCMS or similar? -
I would take out the code page. Although it shows that you have interest in building websites, I just don't think it fits well into the rest of the site. I'm a web designer / developer, and this is as if I had a page on my site related to my enjoyment of tequila. On your contact page, you should have a form so that people can send you a message. Having your email address on the page will get you lots of spam, even if you try to hide it with javascript. You might look at tectite.com to see a great formmail program that you can use for free. I think the rest looks good. It's a nice template for a site with a small amount of content. As this site grows, it will quickly outgrow the template size, but since you enjoy building websites, you will just have fun creating a new template when that time comes.
-
security question regarding processing forms
sKunKbad replied to jeff5656's topic in PHP Coding Help
Even if you used a form token, all somebody would have to do is put that token into their form. You just have to validate everything that is posted. Do you know how to validate posted data? -
force 'https' with .htaccess and codeigniter on godaddy
sKunKbad replied to boo_lolly's topic in Frameworks
1) Godaddy does offer a refund if you cancel. This is your smartest move, but I understand that it might be somebody elses website you are working on. 2) I normally force HTTPS inside a controller. It would be a rare situation that you would want to force HTTPS for an entire site, but in that case, you could just extend the Controller class with a MY_Controller class. Then you would create a constructor that checks if HTTPS is on, and if not redirect to the equivalent HTTPS page. For an example of forcing HTTPS inside an individual controller: public function __construct() { parent::__construct(); // force SSL is available // USE_SSL is defined in a hook - 1 is on and 0 is off if(USE_SSL != 0 && !isset($_SERVER['HTTPS'])) { $this->load->helper('string'); // secure_base_url() and url_suffix() come from an extension of the url helper. header("Location: " . secure_base_url() . trim_slashes( $this->uri->uri_string() ) . url_suffix(), TRUE, 301); exit; } } MY_url_helper.php: <?php /* * Since trying to access a secure URL can result in errors, * this function only creates a secure URL if the my_site_definitions_hook * has the setting for USE_SSL set to 1. */ function secure_base_url() { $CI = get_instance(); $url = $CI->config->slash_item('base_url'); if(USE_SSL === 1) { $url = substr($url, 0, 4).'s'.substr($url, 4); } return $url; } /* * This function checks if SSL is on for the current request, * and if it is, it makes a secure URL. This can be used to * load resources like stylesheets, images, or javascript * in a way that won't cause a partially secure warning in the browser. */ function if_secure_base_url() { $CI = get_instance(); $url = $CI->config->slash_item('base_url'); if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { $url = substr($url, 0, 4).'s'.substr($url, 4); } return $url; } /* * This current_url function has been overridden because * the CI version doesn't allow for secure URLs. */ function current_url() { $CI = get_instance(); $url = $CI->config->site_url($CI->uri->uri_string()); if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { $url = substr($url, 0, 4).'s'.substr($url, 4); } return $url; } /* * This function allows for a more convenient way to * create dynamic URLs that will have the appropriate * URL suffix, as specified in the main config file. */ function url_suffix() { $CI = get_instance(); return $CI->config->item('url_suffix'); } /* End of file MY_url_helper.php */ /* Location: /application/helpers/MY_url_helper.php */ -
I don't think HTML5 and CSS3 are ready to roll, but I do use the HTML5 doctype, which is safe. I don't think we are going to get good enough browser support to start using HTML5 and CSS3 freely for a couple of years (at least). Heck, I'm still supporting IE6 :'(
-
Godaddy has probably either messed around with the max execution time for php, or "adjusted" the max allowed upload filesize. Use phpinfo() to check these settings, and set them in a php.ini or .htaccess file if necessary. I can't tell you how many headaches you will save yourself by moving away from Godaddy. I've used lots of hosts, and they all have issues, but Godaddy
-
Form Error Checking - Showing the error?
sKunKbad replied to peter_anderson's topic in PHP Coding Help
I would guess it is because your second parameter passed to show_error() doesn't exist at the time it is being passed. $e['whatever'] = show_error( 'sjdnflsndlg', $e['whatever'] ); See what I mean? If $e['whatever'] doesn't exist until you create it, then how can the value of $e['whatever'] include $e['whatever']?