Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: Weather.com SDK Module - Leet Add On!

  1. #1
    Join Date
    Feb 2003
    Location
    Omaha
    Age
    40
    Posts
    73

    Thumbs up Weather.com SDK Module - Leet Add On!

    OVERVIEW
    ------------
    Since I'm getting raped by email about our weather mod I thought I'd be nice and share it with you all. "Life is grand, isn't it?"

    With this nifty add on you an provide your viewers with an excellent local weather feed that is eye pleasing and simple for anyone to setup.

    Preview - http://www.rentomaha.com/weather.php

    Please READ THE DIRECTIONS. This is NOT HARD TO INSTALL. If you need help with this simply ask in this thread and NOT by sending me an email or private message. Ask your question publicly so everyone can benefit from the question and answer. If you PM me about this I will ignore you. *Smile*


    PRE-INSTALLATION
    ------------
    1. Download the weather_xml.zip attached to this thread.


    INSTALLATION
    ------------
    1. Sign up for Weather.com's free XML service at http://www.weather.com/services/xmloap.html

    2. After your registration you'll be sent an email with your account information and SDK download location. Download the weather.com SDK and upload all image files to your web server, maintaining the zip file structure. This script assumes you have a folder named "images" on your root and a subfolder named "weather" within it. You should copy the weather.com image folders (logos, 32x32, 64x64, and 128x128) to your weather folder.

    3. Create a table in your database named weather_xml with the following structure:

    CREATE TABLE `weather_xml` (
    `xml_url` varchar(150) NOT NULL default '',
    `xml_data` text NOT NULL,
    `last_updated` datetime NOT NULL default '0000-00-00 00:00:00',
    KEY `xml_url` (`xml_url`)
    ) TYPE=MyISAM;

    4. Configure the following variables in weather_xml.php and upload to your web server:

    $db_host = ""; Your database host (e.g. localhost)
    $db_user = ""; Your database username
    $db_pwd = ""; Your database password
    $db_name = ""; Your database name
    $partner_ID = ""; Your weather.com partner ID you received when signing up for their XML service
    $license_key = ""; Your weather.com license key
    $image_size = "64x64"; Select the size of the forecast images to use

    5. Configure the following variables (YOURDOMAIN) & (ZIPCODE) in the weather.php and upload it to your web server:

    <?php
    include("http://www.YOURDOMAIN.com/weather_xml.php?id=ZIPCODE&length=10");
    ?>

    6. Once both files have been uploaded open your favorite web browser and surf to your weather.php (http://www.YOURDOMAIN.com/weather.php) and you should have a kick ass new weather page.

    7. Put your feed up, smile, and be happy with yourself that you were able to "FOLLOW DIRECTIONS" properly.
    Attached Files Attached Files
    Best,
    Brad
    WWoBn Communications Group

  2. #2
    Join Date
    Jul 2004
    Location
    PA
    Age
    39
    Posts
    97

    Talking Thanks

    Works Like a charm. Keep up the great work.
    George
    Clueless in PA
    www.neparealtor.com
    O-R 2 Dev Site
    http://dev.neparealtor.com

  3. #3
    Join Date
    Feb 2003
    Location
    Omaha
    Age
    40
    Posts
    73

    Default

    Best,
    Brad
    WWoBn Communications Group

  4. #4
    Join Date
    Jul 2004
    Location
    PA
    Age
    39
    Posts
    97

    Default

    Since my site is a local site I'm doing a little but of messing around and did this
    admin weather
    When you click on the weekly forcast it uses this mod. This is basiclly because i'm a weather nut like most people in my area.
    George
    Clueless in PA
    www.neparealtor.com
    O-R 2 Dev Site
    http://dev.neparealtor.com

  5. #5
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54

    Question

    Must have missed something. When I load my page I get "could not connect"

    Just to make sure I am following the lingo here...in your setup it looks like this

    // Setup database connection
    $db_host = "";
    $db_user = "";
    $db_pwd = "";
    $db_name = "";

    In common.php it looks like this.

    $db_user = '';
    $db_password = '';
    $db_database = '';
    $db_server = '';

    Am I correct in assuming that?...
    $db_host = ""; is the same as $db_server
    $db_name =""; is the same as $db_database

    If so I'm not sure what I would have done wrong here.

  6. #6
    Join Date
    Jul 2004
    Location
    PA
    Age
    39
    Posts
    97

    Default

    I had the same problem but then I punched myself in the head and relized I was using the wrong password fot the db

    $db_host = "localhost";
    $db_user = "root";
    $db_pwd = "password";
    $db_name = "realty";
    George
    Clueless in PA
    www.neparealtor.com
    O-R 2 Dev Site
    http://dev.neparealtor.com

  7. #7
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54

    Default

    Unfortunately that is not it. I have copied the password and pasted. I have retyped it. Does the double quote and single quotes matter?

    This is how I have my common.php

    $db_user = 'OMGletsnotpostdbinformaitonhere!';
    $db_password = 'OMGletsnotpostdbinformaitonhere!';
    $db_database = 'OMGletsnotpostdbinformaitonhere!';
    $db_server = 'OMGletsnotpostdbinformaitonhere!';

    This is the weather setup

    $db_host = "OMGletsnotpostdbinformaitonhere!";
    $db_user = "OMGletsnotpostdbinformaitonhere!";
    $db_pwd = "OMGletsnotpostdbinformaitonhere!";
    $db_name = "OMGletsnotpostdbinformaitonhere!";
    Last edited by Mick; 09-17-2004 at 02:15 PM.

  8. #8
    Join Date
    Jul 2004
    Location
    PA
    Age
    39
    Posts
    97

    Default

    do you get just "could not connect"
    or does it give you a full error. For example if I type a wrong password in mine it will throw out
    "Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: YES) in C:\W3Sites\neparealtor\www2\open1\weather_xml.php on line 13
    Could not connect "
    George
    Clueless in PA
    www.neparealtor.com
    O-R 2 Dev Site
    http://dev.neparealtor.com

  9. #9
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54

    Default

    "could not connect" , that's it.

    chitownrealty.com/weather.php if you want to see it.

  10. #10
    Join Date
    Jul 2004
    Location
    PA
    Age
    39
    Posts
    97

    Default

    Did you sign up for a weather.com account? and download the SDK package and then configure the:

    $partner_ID = "xxxxxxxxxxxx";
    $license_key = "xxxxxxxxxxxxxxxxxx";
    George
    Clueless in PA
    www.neparealtor.com
    O-R 2 Dev Site
    http://dev.neparealtor.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •