Jump to content

pyrodude

Members
  • Posts

    97
  • Joined

  • Last visited

    Never

About pyrodude

  • Birthday 07/16/1986

Profile Information

  • Gender
    Male
  • Location
    Spokane, WA

pyrodude's Achievements

Member

Member (2/5)

0

Reputation

  1. pyrodude

    PHP

    Similar to corbin, I solved #1 by solving for 1 of the variables, except I did it by adding the equations (since the y's cancel eachother out) x + y = 3 x - y = 4 --------- 2x = 7 --------- x = 3.5 then plug the 3.5 in for x and voila. It shaved a little time off for me (and/or a little paper if you were writing it out) but it would only work if one of the variables cancelled out.
  2. If you don't have access to cron jobs, however, you could store the values you retrieve in a database then compare the current time with the last time it was retrieved and see if you need to go get the up-to-date info. You'll still be stuck with the slow load time, however. Another option would be to use an iframe to load a separate php file (possible through AJAX) that does nothing but pull the information and display it. That way your page will load quickly and just the stock price will take a minute to display.
  3. Yeah, I think we need some clarification. Do you want the batch file to be run on the server, or do you want the batch file run on the client's computer?
  4. <sarcasm>Wow, I really got lots of help here</sarcasm> I did, however, find the solution to my problem. The website is called Habitually Good and is at http://blog.gadodia.net/php-5-on-iis-6-giving-404-error-and-how-to-fix-it/ The solution worked great for me, despite the wonderful suggestions I received here...
  5. I have a brand new Windows Server 2003 Small Business with IIS 6.0 installed. I got php installed, with all the appropriate Extensions showing up as Allowed in the IIS manager. I can run PHP code from the command line, but I get 404 Page Not Found errors when I try to access them via the server. The files are there, and regular HTML executes just fine. I have absolutely ZERO experience working with IIS, and would appreciate any help! Thanks, Billy
  6. Yeah, that...Lol. That's what I get for not checking the links before I post them...
  7. You realize that that would always be true, don't you? Just making sure. Anyway, I removed the preceding 0 from "08" and it seems to run fine again. Still not sure why it will work that way during the week just not on Saturdays. Ahh well, who am I to judge?
  8. As was said by jesirose, ajax is a great option, assuming the browser supports it. Another option, if a redirect to vote.php is possible, you can use javascript to check and see that the referrer is run.php. This isn't foolproof, however, as some browsers block that information or allow it to be spoofed. Please also try to have an option available for those surfers who do not have javascript enabled.
  9. Right. I'm using H because I want to compare it in a 24-hour timeline (Figured that would be easier for determining the difference between, say, 5am and 5pm) Are you suggesting I use h instead?
  10. Or, you could use the php wraptext() function if you're creating the pdf file dynamically. Learn more: http://www.w3schools.com/php/func_string_wordwrap.asp
  11. Sorry, apparently I was a day too late. Your previous post was very close. Yes, you can use <?php ?> tags anywhere. However, you either need to use <?=$var; ?> or <?php echo $var; ?> in order to output the contents of a variable to the current page.
  12. I personally find the FPDF class (http://www.fpdf.com/) to be much more user friendly then PDFLib. That's just me though. The class is about 40k, plus font files. Not sure the size of PDFLib, but it's certainly a lot easier to create a file using FPDF.
  13. A client of mine requested something for their page that lists their current business hours and whether the store is currently open or not. I thought I had this worked out fine until I was up late working on another aspect of the page and noticed it listing the store as open when it should not be. The code is as follows: <?php $currTime = date("g:i a"); $currDate = date("F jS, Y"); $currHour = date("H"); $currDay = date("l"); $currDayNum = date("d"); $currMonthNum = date("m"); $currStoreState = "<span style=\"color:red\"><strong>CLOSED</strong></span>"; $holCurrDay = "$currMonthNum $currDayNum"; // Holidays are: christmas day, new years day, thanksgiving day, labor day, memorial day, 4th of july, etc -- Still need to set up the math for memorial day, thanksgiving and labor day $holidays = Array( "Christmas" => "12 25", "NewYear" => "01 01", "July4th" => "07 04" ); foreach ($holidays as $value) { if ($holCurrDay == $value) { $isHoliday = true; } } if ($isHoliday == false) { if ($currDay != "Sunday") { // Closed Sundays, so exclude that if ($currDay == "Saturday") { if (($currHour > 08) && ($currHour < 17)) { // Saturday hours are 9am-5pm $currStoreState = "<span style=\"color:green\"><strong>OPEN</strong></span>"; } } elseif (($currHour > 07) && ($currHour <19)) { // All other days the store is open 8am-7pm $currStoreState = "<span style=\"color:green\"><strong>OPEN</strong></span>"; } } } echo "Today is $currDay, $currDate at $currTime<br /><br />We are currently: $currStoreState"; ?> The check lists the store as being open starting at 1:00am on Saturdays (however it closes at 5:00 like it should...) What I don't understand is that the code directly below it works just fine, and it's set up exactly the same. If someone can see my logic error somewhere in there, please let me know! Thanks Billy
  14. In order to create the div at the beginning of the main div and then move it part-way down the page, doesn't it need to be position: relative? I don't know of any other way (except maybe javascript...and even then I'm not sure!) to move its location. Please enlighten me! I misspoke in saying I was moving it to the right and down. What I meant to say was that the float: right was moving the div to the right and the top: 100px was moving it down. Sorry for the confusion. As for the way it affects the text around it, is there any way around that? Here's what I'm trying to prevent: The issue seems to revolve around the use of position: relative, as it takes it out of the regular flow of the page. So, I guess this is more of a positioning issue. Is there a way to position a div manually via CSS, JavaScript, or some other miracle worker? Thanks...
  15. pyrodude

    floating div

    What I'm planning to do is insert a div at the beginning of another div (an AJAX div inside a main content div) and position it relatively. Here's an example of what I have: <div id='mainContent'><div id='rightDiv'>This is a right-float div<br /><br /><br />blah!</div> <b>This is a big main content div <br /><br /> <br /> <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. <br />. </div> and the CSS is: #rightDiv { position: relative; float: right; top: 100px; width: 100px; } What I'd like to do is find a way to have text wrap around the div (therefore not get placed on top of or behind it - i think this excludes using position: absolute) I've been using relative positioning to move the div to the right and down 100px, but it winds up affecting the first few lines (the mainContent div text is centered, and this div scoots the top 3 or 4 lines to the left a little bit. I can't seem to figure it out, can anyone else?
×
×
  • 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.