![]() |
|
#1
|
||||
|
||||
Using datafeeds for affiliate programsOne of my recent sites focuses a complete section catered by one merchant and this has led me to start work on integrating their datafeed into the web site.
Is anyone out there using datafeeds? I haven't had much luck finding any articles or posts on this and I will most likely start this project from scratch using PHP/MySql. Any tips or ideas? |
|
#2
|
||||
|
||||
|
The last time I communicated with a merchant / advertiser about their datafeed, he pointed me to this one humungous text file - that put a damper on my (very) brief foray into this idea.
This datafeed you talk about, is it in XML or simply a text file or something else? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
||||
|
||||
|
The one I looked at was a tab delimitted text file...about 600k. It would be a manual process but the changes are usually minor.
|
|
#4
|
||||
|
||||
Import the text file into MySQLThe next question is: Do you see yourself using the datafeed off the text file directly or would you prefer to import this datafeed into a database table for instance?
If it were up to me, I would go the way of importing it into a MySQL database table - for obvious reasons (one of them being SPEED). If this is what you would prefer to do too, then you'd have to share the following information so I can suggest a few things:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
||||
|
||||
|
Yeah I was thinking that putting it into a MySQL database would be the best way to go. Here are the fields I'll be dealing with.
Quote:
I don't think it'll be too bad...should find out when I start tonight. |
|
#6
|
||||
|
||||
|
Alright,
So I decided to do most of the database stuff through PHPMyadmin and so far so good. Created the table and inserted all the data...now to the next step, running some queries. |
|
#7
|
||||
|
||||
|
Almost done...just have to work on the formatting the output.
|
|
#8
|
||||
|
||||
|
A few hiccups. Here my partial code for the output:
PHP Code:
Quote:
Any ideas on how I could do this? |
|
#9
|
||||
|
||||
|
I have just the thing for you; I use it to drive the categories menu on GIDTopsites™ : http://topsites.gidhelp.com/
You need to copy and paste the PHP class below and filename it, HGtable.lib.php PHP Code:
Then in your script example above, edit the bit to something like this: PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#10
|
||||
|
||||
|
Much nicer than my counter based try. Thanks.
ps - you should put this in the PHP library...cause I actually checked. |
Recent GIDBlog
A Week in Kuwait by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Google Adsense could mean death to affilliate programs | jrobbio | AdSense Forum | 12 | 11-Feb-2006 15:51 |
| premade forums and other premade php programs | invaderz | MySQL / PHP Forum | 1 | 06-Jul-2003 02:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The