Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing variables from URL, pass to another site, getting text back

Status
Not open for further replies.

happyclicking

Technical User
Sep 13, 2005
5
CA
Hi everyone!
I want to be able to put some PHP code into WebsiteA so that it talks to WebsiteB's database - and displays different content in WebsiteA's page.

For example, if WebsiteA has variables "a" and "b".. then this is sent over to WebsiteB, searched thru the DB, and "apple" and "banana" are then displayed in WebsiteA's webpage [exactly where the script is put]. So if WebsiteA changes the variables, then different stuff is displayed (but this comes from WebsiteB). IE. If I click on the url websiteA.php?a=1&b=2, the values of a&b are taken from websiteB, and displayed for me in websiteA's page. All that websiteA needs to do put the variable a&b anywhere on their page that they want stuff to be displayed.

I guess a great example of this would be the "Virus Info Feed" that Antivirus software company's offer that you can post on your site (using their script).

I guess, in short, how do you get both website's to pass information back and forth (without using a Form). I understand passing variables within a website, but not sure how to do it for 2 complete websites.

Thanks in advance!
 
Take a look at AJAX (that's the buzz-word that you can google on). It requires javascript (you are effectively submitting a form through a javascript object - so the page never refreshes etc). A good example of this is the GMail web application that Google have at the moment.

If you decide to follow up on this, I suggest doing some research and then posting AJAX related questions in the Javascript forum.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Thanks for the replies!!
Looks like i'll be reading up on some stuff.. much appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top