Jump to content

Archived

This topic is now archived and is closed to further replies.

Briant142

Receiving Live data feeds

Recommended Posts

I need to setup a php page that will accept data feed from a vendor.  The data is names and addresses and emails sent on a live feed as the customer signs up at my vendors sight.  My vendor has it set up to push out this data to me.  How do I design a page to accept the data as they are pushing it to me?  I have php and mysql running on my webserver and all I need to do now is enter the parameters to accept the data as it is sent and put it into a database. 

Share this post


Link to post
Share on other sites
What do you meen by them [i]pushing[/i] the data to you? Most feeds are xml, and very easy to impliment in php 5, but have nothing to do with [i]pushing[/i].

Share this post


Link to post
Share on other sites
Not sure pushing is correct term.  They just said that I had to setup a page to receive the parameters. 

Share this post


Link to post
Share on other sites
Just got off the phone and they said that they use .net.  All I had to do was give them the directory that the php site was located and they could start posting there.  I also have the parameters.  Im assuming that these are the names of the fields to asccept - IE:

– fname = first name of the user associated with the email.
– lname = source_url, the opt in site, example: www.mysite.com.
– addr1 = address.
– addr2 = unit, Suite or apartment number.
– city = city.
– state = 2 character (US and CA only)
– gender = 1 character, m=male, f=female.
– phone = (mask 999-999-9999)
– country = 3 character ISO compliant code. (mask XXX)
– dob = date of birth (mask MM/DD/YYYY)

Share this post


Link to post
Share on other sites
Ah, so when they say they are posting it then it probably means they will send the data via POST, which can be accessed in $_POST

Share this post


Link to post
Share on other sites
Ok so I need to use the $_POST.  I do not know where to start.  What do I need to do.  Thank you in advance for the help - I am in way over my head here.  I have PHP and mysql and apache installed so I think I am ready to begin with developing the page and linking it to a database right?

Share this post


Link to post
Share on other sites
Well, first you'd take in each variable YOU need, and make them usable, for instance:
[code]
$input = array();
$input['fname'] = $_POST['fname'];
$input['lname'] = $_POST['lname'];
//And so on
[/code]

You will need to create a database and table, if you have PHPMyAdmin or can install it then that would be the easiest way.

Share this post


Link to post
Share on other sites
ok - I have the code in place and I have installed phpmyadmin - I have created the database and the table.  where do I reference the database name in the code of the site. and how do I test it?

Share this post


Link to post
Share on other sites

×

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.