Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Http_request help

Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-22-2009 23:59
CODE

http_response( key vKeyQueryID, integer status, list metadata, string body ){


in the future it's pretty quick to throw in some owner says to see that you are getting the data you expect
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Sherman Gustafson
Registered User
Join date: 5 Sep 2007
Posts: 28
01-05-2010 09:52
Sorry to bring this back after so long, but I have a quick question.

I got my tracker working and everything... but I can't figure out how to add each avatar's birth date (when they joined SL) to the http_request.

I am already getting it through the llRequestAvatarData call, but I don't know how to add it to the http_request
Sherman Gustafson
Registered User
Join date: 5 Sep 2007
Posts: 28
01-05-2010 11:51
Nevermind... I got it.
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
01-05-2010 12:01
The source of the search result web profile will include a line like this:

< p class="info">< span class="syscat">Born on:< /span> 2009-11-09< /p>

(spaces added after open angle brackets for forum posting)

so you can pick out the data like this:

string prefix = "Born on:</span> ";
integer index = llSubStringIndex (body, prefix);
string birth = llGetSubString (body, index + llStringLength (prefix), index + llStringLength (prefix) + 9);

However, I understand the the data returned in http_response is capped, so this might just get droped off the end of the returned page.

ETA: lols, that'll teach me to answer the phone while doing a forum post.
Sherman Gustafson
Registered User
Join date: 5 Sep 2007
Posts: 28
01-06-2010 10:40
Okay, I thought I had it working... but it turns out I didn't.

It gets my avatar creation date for everyone. I thought it was working because it was picking up my correct creation date and reporting it to the server... However, when it tracks someone else, it reports my creation date and not theirs. Anyone know why it would do this?

EDIT// I think I got this one too. I had a typo in my code. I will post back if it didn't work.
1 2