sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
You might download osCommerce and see how they are applying multiple languages to the same page. It's really pretty simple. You use a cookie to track the preferred language of the user, and extract your content from a database or flatfile based on the language preference.
-
The real problem with a table based layout is that the order in which your content is provided to a screen reader, search crawler, etc. is different than with a pure CSS layout using divs. You know that you can float, and use absolute positioning with CSS and divs, and this is a good thing because you can put your real content at the top of your document (even if it appears lower on screen). Take a look at my website with all style turned off, or with images turned off, or both. The content that exists behind the style and images is what makes the page what it is.
-
You should try the javascript forum
-
You should try the regex forum
-
$first = substr("01234567890", 0,5); // returns "01234" $last = substr("01234567890", -6); // returns "567890" echo $first . " " . $last;
-
How to add a blank option to this select field
sKunKbad replied to 86Stang's topic in PHP Coding Help
Replace: $project_drop = "<select name=\"task_project_id\">\n"; with $project_drop = "<select name=\"task_project_id\">\n<option value=\"\" selected=\"selected\">\n"; and replace $project_drop .= "<option value=\"$row[project_id]\" selected>$row[project_name]</option>\n"; with $project_drop .= "<option value=\"$row[project_id]\" >$row[project_name]</option>\n"; -
I understand that the IP address comes from the TCP/IP packets, and I was just hoping to be able to spoof the IP somehow. I'm not interested in hacking or anything malicious in nature, just to simply have our cURL posts accepted as normal by getresponse. I did contact the getresponse admin, and they expect posts to be generated only from HTML forms, which in the case of my customer is impossible. I'm guessing that we will be switching email database services because of this issue, since it doesn't seem like there is a way to manipulate the IP address being sent in the TCP/IP packet.
-
I have a customer that has an account with getresponse.com, which is an online email database solution. We use cURL to send posts to getResponse. The posts include customer contact data. When a post is sent from the server, getresponse.com checks out the IP address of the sender, and if too many posts are made from an IP, getresponse.com blocks the IP. getresponse.com says that we should be using a static form to send the posts, but due to programming that is accomplishing other things with the customer data, we can't simply do this. So my question is, is there any way to fake the IP address that getresponse is seeing as the sender of the post? If there is, this may be our only hope short of changing email database companies.
-
I'd like to make it so that only a script or scripts from the phpSitemapNG directory on my server have access to a file called last modified, but when I put the following files container in the .htaccess file, it gives me a 500 error. Actually it is the allow from line. How do I format the allow from line so that only scripts in the phpSitemapNG directory can access the lastModified script? <Files "lastModified.php"> order deny,allow deny from all allow from mysite.com/phpSitemapNG ##This is the line that is producing the 500 error </Files>
-
How to check which page is freading a script?
sKunKbad replied to sKunKbad's topic in PHP Coding Help
Well, unless I put a last modified header on a page that I want in my sitemap, it won't have an accurate last modified date/time. This is what I'm using: header("Last-Modified: " . gmdate("D, d M Y H:i:s", getlastmod()) ." GMT"); it is fopening and freading the file. Perhaps it is executing the php within the file somewhere, because if it didn't I don't know how it would get that last modified date/time. -
How to check which page is freading a script?
sKunKbad replied to sKunKbad's topic in PHP Coding Help
Yes, it is the phpSitemapNG, which is a php sitemap generator that is freading the script. If it freads it, I want to output a last modified header, but if it doesn't, like if it's just anyone else or google, i don't want to output the last modified header. -
I've got a need to check which page is freading a script, and output something if it is that page or not. Lets say I want to only let /somepage.php see something output. I've tried REQUEST_URI, but its obviously not the right server variable. So this is within the script, not somepage.php: if ($_SERVER['REQUEST_URI'] == '/somepage.php'){ echo "you are on the somepage.php page"; } What is the correct way to do this?
-
Well, I changed the fact that the stylesheet was being generated through php, and it's working for me in IE6.
-
Yes, I have been working on it. It's working in my Mac FF3, but I haven't tried Win FF3 yet. Thanks for the heads up though.
-
While it may be a header issue for the incoming CSS file, there's no way the CSS itself has a problem. It validates perfectly. The XHTML also validates perfectly. CSS -- http://www.brianswebdesign.com/style.css
-
Yeah, I hate IE6 too, but if it were a simple fix I'd feel better about fixing it. The whole rest of the site looks normal and works in IE6.
-
I have been working on a CSS theme changer, which is done using mod_rewrite and a redirect. All is well in most of the browsers I have tried (FF2, IE7, Opera, Safari), but IE6 doesn't like it. I do admit, I am running a standalone IE6, so that could be the reason. I don't actually have access to a real installation of IE6, so it may not be a problem for "normal" IE6 users. Perhaps you could check it for me if you have a real installation of IE6. First the rewrite rule (which is fairly normal): rewriteRule ^style.css$ http://www.brianswebdesign.com/style.php [NC,L] So when each page is looking for a stylesheet, they are actually being fed /style.php: <?php session_start(); $rose_theme = "rose_theme.css"; $blue_theme = "blue_theme.css"; if(isset($_SESSION['stylesheet'])){ $choice = htmlspecialchars($_SESSION['stylesheet']); $styleChoice = $$choice; }else{ $styleChoice = $rose_theme; } $style = file_get_contents($styleChoice); header("Content-Type: text/css"); echo $style; ?> There is a simple form associated with the user being able to pick the theme: <form method="post" action="themeChanger.php"> <select id="theme_choice" name="theme_choice"> <option value="blue_theme">Blue</option> <option value="rose_theme">Rose Garden</option> </select> <input type="submit" value="Change Theme" /> </form> and then there is themeChanger.php, which is a redirect script: <?php session_start(); if(isset($_SERVER['HTTP_REFERER'])){ $samePage = htmlspecialchars($_SERVER['HTTP_REFERER']); }else{ $samePage = 'http://www.brianswebdesign.com'; } $theme = filter_input(INPUT_POST, 'theme_choice' , FILTER_SANITIZE_STRING ); if ($theme == FALSE || $theme == NULL){ $_SESSION[stylesheet] = 'rose_theme'; }else{ $_SESSION[stylesheet] = htmlspecialchars($_POST[theme_choice]); } header("Location: $samePage"); ?> For some reason, IE6 just hangs when I test this on the production server. On my home computer, IE6 does fine. Any hints as to what might be wrong is appreciated. I'm also wondering if I am protecting myself correctly in terms of $_POST, $_SERVER, and $_SESSION variables.
-
I had never heard this before. Thanks for posting.
-
I tried going to this link, but I get an error that the topic is missing or off limits to me??
-
want to know how to optimize a site to work with all browsers
sKunKbad replied to yanivkalfa's topic in HTML Help
Your site reminds me of the days when I was learning CSS. To be kind, this site needs a total re-design. All of those absolutely positioned divs and tables have got to go. You need to learn relative positioning. What you are trying to do is relatively easy if you will search for "CSS float tutorial" on yahoo. Once you have learned how to float divs, scrap what you have made and see what you come up with. The whole idea of absolute positioning isn't to make a CSS table, which is what you have made. Absolute positioning is very necessary, but with the wrong implementation, you may as well have made the site in Frontpage or Dreamweaver. -
[SOLVED] Getting data between two pieces of text
sKunKbad replied to chris_2001's topic in PHP Coding Help
You might check out the preg_replace() function in the manual. -
This little tidbit of code is a form that posts to the same page, so the contents of filter_input() would be whatever is typed into the realname form field once submitted. I'm not working on a project, I'm just trying to learn what exactly would need to be typed in to the realname form field to make the filter_input function fail.