Jump to content

aeroswat

Members
  • Posts

    851
  • Joined

  • Last visited

    Never

Everything posted by aeroswat

  1. Lol pikachu I think he might be talking about using a GET to display certain search results and people are just linking to that or cURLing the info off his site and in that case google might not do it for him. But I no understand english broken that is.
  2. Give an example of what the hell you are talking about please.
  3. Just curious... what is the point of the Session active variable? You are familiar with session cleanup and session cookie lifetimes correct?
  4. So I tried this... $forecast = simplexml_load_file('http://www.google.com/ig/api?weather=New%20York'); foreach ($forecast->forecast_conditions as $weather) { printf("Day of Week %s\n", $weather['day_of_week']); } And it didn't do anything. Any advice or direction would be appreciated.
  5. because for some reason if I don't absolutely position it it goes all over the place in IE. It jumps down like some 200 pixels on the screen and the entire site starts there with a bunch of white space.
  6. I found this example on SimpleXML $library = simplexml_load_file('library.xml'); foreach ($library->shelf as $shelf) { printf("Shelf %s\n", $shelf['id']); foreach ($shelf->book as $book) { printf("Title: %s\n", $book->title); printf("Author: %s\n", $book->author); } } so can i place this string in the load file function or do I need to do something else to it before I use it in that function? http://www.google.com/ig/api?weather=New%20York
  7. Have you ever used php before? All you have to do is either make the link submit a GET request (parameters in the URL) or I believe you need to also use javascript to have it submit a POST request.
  8. So I've never worked with XML before and I want to use the google API's. I've been doing quite a bit of scouting and this is what I've seen two different ways of doing things for the most part but neither are working for me Here is the code i was using $objDOM = new DOMDocument(); $objDOM->loadXML('http://www.google.com/ig/api?weather=New%20York'); $weather = $objDOM->getElementsByTagName("current_conditions"); foreach( $weather as $value ) { $dows = $value->getElementsByTagName("day_of_week"); $dow = $dows->item(0)->nodeValue; $lows = $value->getElementsByTagName("low"); $low = $lows->item(0)->nodeValue; $highs = $value->getElementsByTagName("highs"); $high = $highs->item(0)->nodeValue; $conditions = $value->getElementsByTagName("condition"); $condition = $conditions->item(0)->nodeValue; $pics = $value->getElementsByTagName("icon"); $pic = $pics->item(0)->nodeValue; echo "Day of Week: $dow <br>"; echo "Low: $low <br>"; echo "High: $high <br>"; echo "Condition: $condition <br>"; echo "<img src='www.google.com" . $pic . "' /><br /><br />"; } Can someone help me with what I'm doing wrong? It's not outputting anything but the labels When I go to that address this is what prints out <xml_api_reply version="1"> − <weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0"> − <forecast_information> <city data="New York, NY"/> <postal_code data="New York"/> <latitude_e6 data=""/> <longitude_e6 data=""/> <forecast_date data="2010-07-14"/> <current_date_time data="2010-07-14 22:11:12 +0000"/> <unit_system data="US"/> </forecast_information> − <current_conditions> <condition data="Cloudy"/> <temp_f data="77"/> <temp_c data="25"/> <humidity data="Humidity: 80%"/> <icon data="/ig/images/weather/cloudy.gif"/> <wind_condition data="Wind: N at 8 mph"/> </current_conditions> − <forecast_conditions> <day_of_week data="Wed"/> <low data="72"/> <high data="79"/> <icon data="/ig/images/weather/chance_of_storm.gif"/> <condition data="Scattered Thunderstorms"/> </forecast_conditions> − <forecast_conditions> <day_of_week data="Thu"/> <low data="74"/> <high data="89"/> <icon data="/ig/images/weather/partly_cloudy.gif"/> <condition data="Partly Cloudy"/> </forecast_conditions> − <forecast_conditions> <day_of_week data="Fri"/> <low data="78"/> <high data="93"/> <icon data="/ig/images/weather/partly_cloudy.gif"/> <condition data="Partly Cloudy"/> </forecast_conditions> − <forecast_conditions> <day_of_week data="Sat"/> <low data="76"/> <high data="92"/> <icon data="/ig/images/weather/chance_of_storm.gif"/> <condition data="Scattered Thunderstorms"/> </forecast_conditions> </weather> </xml_api_reply>
  9. here is some css for the header div body{ margin: 0; padding: 0; border: 0; overflow: hidden; height: 100%; max-height: 100%; background-color: #336622; } #framecontentLeft, #framecontentTop{ position: absolute; top: 0; left: 0; width: 200px; height: 100%; overflow: hidden; background-color: #336622; color: white; } #framecontentTop{ left: 0px; right: 0; text-align: center; width: auto; height: 140px; overflow: hidden; background-color: #336622; color: white; } * html body{ /*IE6 hack*/ padding: 140px 0 0 200px; /*Set value to (HeightOfTopFrameDiv 0 0 WidthOfLeftFrameDiv)*/ } * html #framecontentTop{ /*IE6 hack*/ width: 100 } and the div that it is supposed to use this is here <div id="framecontentTop" style="width: auto;"> <img src="images/banner4.png" /> </div> It contains only an image that I want centered across the top of the whole page. It works in FF but not in IE and I'm going nuts trying to figure out why
  10. Not sure where I would post this because I don't know how I can go about this but if i can get php to do it then its that much better I want my images to be transformed so that they have a transparent/fade-to-color border around them. This is similar to the Fuzzy Border filter in GIMP. Does anyone know how I can go about doing this with script?
  11. Zzz... I forgot the li in that activemenu id definition Thanks
  12. I am trying to make my active link be a different color (orange) But it's always defaulting to the navmenu li a definition. What can I do to change this behavior? menu.css #navmenu{ border: 1px solid black; border-bottom-width: 0; width: 175px; } #navmenu ul{ margin: 0; padding: 0; list-style-type: none; font: normal 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif; } #navmenu li a{ display: block; padding: 3px 0; padding-left: 9px; width: 159px; /*185px minus all left/right paddings and margins*/ text-decoration: none; color: white; background-color: #2175bc; border-bottom: 1px solid #90bade; border-left: 7px solid #1958b7; } a#activemenu{ background-color: #FFAA33; border-left-color: #FF0000; } * html #navmenu li a{ /*IE only */ width: 187px; /*IE 5*/ width: 159px; /*185px minus all left/right paddings and margins*/ } #navmenu li a:hover { background-color: #2586d7; border-left-color: #1c64d1; } #navmenu div.menutitle{ color: white; border-bottom: 1px solid black; padding: 1px 0; padding-left: 5px; background-color: black; font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif; } index.php <div id="navmenu"> <div class="menutitle">Navigation</div> <ul> <li id="activemenu"><a id="activemenu" href="index.php">Home</a></li> <li><a href="location.php">Location</a></li> <li><a href="prices.php">Prices</a></li> <li><a href="contact.php">Equipment</a></li> <li><a href="contact.php">What to Bring</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> <div class="menutitle">Links</div> <ul> <li><a href="linkgoeshere">Weather Forecast</a></li> <li><a href="linkgoeshere">River Height</a></li> </ul> </div>
  13. I am having a problem with mail() and stripslashes() I am trying to email the $message and this is what $message contains stripslashes($studentName); $studentName = Johnny O\'neal If I mail it without stripslashes It displays: Johnny O\'neal if I mail it with stripslashes it displays the same thing...
  14. Here is a little snippet of code that this problem pertains to. function clean($str) { $str = @trim($str); $str = str_replace('"',"", strip_tags($str)); $str = str_replace("'","", strip_tags($str)); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } if(isset($_POST['FName'])) {$studentFName = clean($_POST['FName']);} $qry.= (isset($studentFName) ? "StudentFName LIKE '%" . $studentFName . "%' AND " : ''); so basically the previous form has a text box named FName. When I submit the form I leave FName unfilled. When it gets to the next page the $qry string has the "StudentFName LIKE '%%' AND" string included in it. If I'm right this shouldn't happen because FName was not set in the form. Am I missing something?
  15. Thanks. That didn't seem to work out for me the way that I was doing it so I decided to just split in separate arrays and use the multisort that way. Thank you for the help!
  16. This is a css issue. You will need to do one of two things Create a container div for the text on the right and the google translation together and give the child div's widths that allow them to be on the same line or use absolute positioning. Either way you will get a better response if you provide more code and post in the css forums.
  17. $count = 0; while(condition) { $count++; if($count %4 == 0) { echo "</tr><tr>"; } }
  18. Is there a function that will sort pairs in an array? I have an array of arrays. Data is in there like this arr[0][0] = timestamp1 arr[0][1] = data1 arr[1][0] = timestamp2 arr[1][1] = data2 etc I want to sort my pairs by the timestamp so that all of the newest timestamps will be on top and oldest on bottom. Is there a function in php that does this or a quick work around with several functions I can use?
  19. Rofl. I cut it down to this small amount of code to find that... zzz thank you pfma. I thought I was done editing it but I'm not. I guess I can go in and change that real fast. Thanks again
  20. This is really irritating me and unless i'm just absolutely not paying attention to something on this im about to just give this host the boot. Please some one make me feel stupid for missing something here I am getting a 500 http error on this page altercounty.php <?php echo "rawr"; if($_GET['type']==1) { echo "2" } ?> I visit this page: http://www.xxxxxx.org/functions/altercounty.php?type=1
  21. I have 2 arrays 1 has the following values Orange, Banana, Apple The other has the following values Orange, Blue, Green I want to have an array that contains all the values in array 2 that are not in array 1 so it would have Blue, Green
  22. I'm using bluehost and many of my files in subdirectories that were fine on friday are no longer showing on monday. I am getting 404 webpage not found errors for everything. They claim no server maintenance has been done and the files are all still showing there. Can anyone think of any reason for this to be happening?
  23. Thanks. I have a few more problems to fix in the system before my temporary employment has expired so I don't think I have time to make that universal. I'll do it at home once I'm out.
×
×
  • 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.