Getting data via HTTP-Request

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
metallison
Forum Newbie
Posts: 1
Joined: Sat Jun 01, 2002 12:10 pm

Getting data via HTTP-Request

Post by metallison »

Hi!

I'm trying to get Data (jpgs or gifs) from one to another server via HTTP. Can someone give me an Example-Code, how I can manage this as quick as possible? If tried to solve the problem via the fsockopen- and the fputs-function to read the data from the server on the client-side and a special php-script, that gives just the requested picture back on the server-side. but this solution is really slow. does someone have a good solution?

thank you in advance.

greetings lars
MattF
Forum Contributor
Posts: 225
Joined: Sun May 19, 2002 9:58 am
Location: Sussex, UK

Post by MattF »

Would fopen() be quicker than opening a socket connection?
MacDaddy
Forum Newbie
Posts: 12
Joined: Sun May 05, 2002 9:36 pm
Location: Atlanta, GA

Post by MacDaddy »

mattF,

fopen(); would be faster, however, some sites prevent the use of it.

Right now I'm in the process of finishing a script that integrates with an online rpg (alienaa.com), my url (http://alienaa.allthewrongstuff.com) doesn't have all my code on it yet, I still have a few sections to add.
Post Reply