1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

file_get_contents, then how to use the contents?

Discussion in 'PHP' started by oskare100, Mar 13, 2008.

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

            $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);
    Code (markup):
    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:

    OK: 464fhjolilw8ad6awde8844
    Code (markup):
    So when I make the request to http://api.ddddddd.com/http/auth?api_id=$ddd_appid&user=$ddd_user&password=$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
     
    oskare100, Mar 13, 2008 IP
  2. Randombase

    Randombase Peon

    Messages:
    224
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $sess_id = str_replace('OK: ','',$request_sessionid);
    Code (markup):
    :) ?
     
    Randombase, Mar 13, 2008 IP