Jeremy Dicaire
Jeremy Dicaire

Reputation: 4905

Connect to an external website with PHP

Let say i have a website (called s1.com..?) with a login form. After you succesfully log on the website, you have a page with some status infos like : Ticket Closed. since... And then ai have a page, on another server that need to go on s1.com, log me in and then retreive the date if the ticket is closed...

I dont really need all of the script since i think i can figure it out, but i wonder how do i make the first part, connecting the webpage onto the s1.com webpage so ill be able to fetch data?

Thanks for any help guys!

Upvotes: 2

Views: 7330

Answers (2)

xkeshav
xkeshav

Reputation: 54042

I think You can also Use JSONP with jQuery, this is alternative of CURL ( i may b wrong ) here is some useful links

Upvotes: 0

El Yobo
El Yobo

Reputation: 14956

You can use either curl (link has an example) or fopen (see the examples section).

Note that using fopen requires that the allow_url_fopen setting to be enabled, while curl requires the curl module to be enabled.

Upvotes: 2

Related Questions