Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > General Support Issues

Notices

General Support Issues Answers to general questions and help with common problems. For help with a specific issue, post to one of the forums below.

Reply
 
LinkBack Thread Tools
  #1  
Old 10-13-2006, 06:52 PM
Private
 
Join Date: Sep 2006
Posts: 1
Question Tokens

I need to create a link to a MLS listing for my site and in order to do that I need to get a Token from the site so that they know it is me. They gave me Perl as an example but not PHP does anyone have PHP code on how to get a Token here is the example Perl code they gave me.

Also do I have to set up my page as php or do I create an html page and then pull in html code and put the php code in there. I am not sure how to do any of this so any help would be appreciated.

Thanks!

perl code example:

#!/usr/bin/perl -w
#
# This script MUST be placed on the server (or behind the proxy server) that uses
# the IP addresses you provided when signing up to work. You must also set the ID
# number where noted below.
#
# I have tested and gotten this to work on both the i386 linux (Slackware), and
# NT 2000 platforms.
#
# LWP::Simple is a module included in the libwww-perl package, and SHOULD be availabe
# on most servers running perl for CGI scripting purposes.
# The most current ver. of the libwww-perl package as of the writing of this is
# libwww-perl-5.64.tar.gz and is available for dload at http://www.cpan.org
# It can be directly ftp'd from ftp.cpan.org from /pub/CPAN/modules/by-module/LWP/.
# If you need further functionality or would rather write your own interface script,
# you might find the modules IO::Socket and URI, or LWP::UserAgent (the 'full' version of
# LWP::Simple) usefull. These can also be found in the libwww package.
use LWP::Simple;
# You must replace the pid below ('19' in this example) with your ID (939 mine )number that
# you recieved after applying for IDX access.
$token = get("http://token.hhi.marketlinx.com/tokeninit.asp?pid=[939]");
# Everything below between the END_of_HTML block tokens is just basic HTML.
# This can be edited to suit whatever needs you might have. I've included a very
# basic frameset but this can be changed to be as much as it needs to be.
#
# One note here, Perl uses the '\' char to force printing of command characters.
# IE, if you need to actually print out '$money' for instance instead of having this
# script think that $money was variable you would need to type it as '\$money'.
# This shouldn't be an issue, but if you see funny things happen here with HTML code
# keep that in mind. I believe I have had an instance or two where I've had to preceed
# the " char with a backslash. It probably depends on what ver. of Perl that is being used
# on the server side.
print <<END_of_HTML;
Content-type: text/html
<html>
<head>
<title>some title</title>
</head>
<frameset rows="15%,*">
<frame name="header" target="main" src="http://www.morellasite.com/mls.html">
<frame name="main" src="http://idx.hhi.marketlinx.com/templa...asp?sec=$token">
</frameset>
</html>
END_of_HTML
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


All times are GMT +1. The time now is 12:05 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2005-2009 VodaHost Web Hosting Your Perfect Web Host - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176