Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-17-2002, 06:39 AM   #1 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
weather function?

anyone used any kind of weather function? something that will pull up weather info from an external source (ie. weather.com, cnn.com, etc...) so i can use it on my page....

Admin
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 06-17-2002, 08:27 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
hmm .. there's probably xml feeds on that stuff .. ya think?

with the ecommerce stuff, i'm using the following method to extract xml data into variables.

<?
$string="<somexml>somethinghere</somexml><temperature>72</temperature>";

$startpos = strpos($string, "<temperature>");
$endpos = strpos($string, "</temperature>");
$temperature = substr($string, $startpos, $endpos - $startpos);

echo "The current temperature is: $temperature";

?>

now the variable $temperature = 72;

you probably already knew that, but i just learned it last week. do you know of any better way to parse xml? i know that php has some xml functions, .. but it isn't that clear what they do.
sde is offline   Reply With Quote
Old 06-17-2002, 08:35 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
xml link:
http://weather.boygenius.com/
sde is offline   Reply With Quote
Old 06-17-2002, 11:37 AM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
i actualy havent used XML w. PHP yet. i will mess with that and see what i can come up with..

thanks

Admin
__________________


Urban Clothing
Admin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom function bdl PHP 3 03-07-2003 05:53 PM
problems w/ c++ pow() function brtklt Standard C, C++ 0 10-10-2002 12:25 PM
pass filename to function Blaqb0x Standard C, C++ 1 09-02-2002 10:12 PM
trouble calling auxiliary function in a class brtklt Standard C, C++ 0 07-18-2002 05:22 PM


All times are GMT -8. The time now is 11:20 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting