file_get_contents, then how to use the contents?

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
oskare100
Forum Commoner
Posts: 80
Joined: Sun Oct 29, 2006 5:47 am

file_get_contents, then how to use the contents?

Post by oskare100 »

Hello,
I've a request that looks about like this:

Code: Select all

       $request_url1 = "http://api.ddddddd.com/http/auth?api_id=$ddd_appid&user=$ddd_user&password=$ddd_passw";
        $request_sessionid = file_get_contents($request_url1);
Back from that I should get an ID I need to include in another request, if I write the address in a normal browser the response looks like this:

Code: Select all

OK: 464fhjolilw8ad6awde8844
So when I make the request to http://api.ddddddd.com/http/auth?api_id ... $ddd_passw I need to assign the ID I get back (464fhjolilw8ad6awde8844 in this case) to a variable so I can use it in another request, but I can't figure out how to do that so I need help...

/Oskar
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: file_get_contents, then how to use the contents?

Post by hawleyjr »

Do you have fopen wrappers enabled?

http://us3.php.net/manual/en/ref.filesy ... -url-fopen
Post Reply