|
[Mar. 3rd, 2002|09:56 am]
LiveJournal Client Discussions
|
Sorry for not being more specific with my last post...I am having some problems with my client's PHP code... MY CODE IS:
?php $host = "www.livejournal.com"; $fp = fsockopen( "$host", 80, &$errno, &$errdesc); if ( ! $fp ) die ( "Coudln't connect to $host:\nError: $errno\nDesc: $errdesc\n" ); $request = "POST /interface/flat HTTP/1.0\r\n"; $request. = Host: $host\r\n"; $request. = "Content-type: application/x-www-form-urlencoded\r\n"; $request. = "Content-length: 34\r\n"; $request. = "mode=login&user=bobert225&password=force&clientversion="PHPUpdate/V1.0.1"\r\n"; fputs ( $fp, $request ); fclose( $fp ); ?
It is giving me parsing errors on the lines that say "$request=".
-bobert |
|
|
Comments: |
You've put quotation marks around the clientversion. You don't need to do this.
By putting quotations within a quoted string, you'll get a parse error.
Just do...
$request. = "mode=login&user=bobert225&password=xxxxx&clientversion=PHPUpdate/V1.0.1\r\n";
And I would also highly recommend x'ing out your password in this post :-)
...or you type \" instead of " for all quotation marks inside the two outer ones.
Btw, another quotation mark is missing here:
$request. = Host: $host\r\n";
should be
$request. = "Host: $host\r\n";
D'oh! I missed that one! :-\
thanks guys, i really appreciate it. also, one other question: what do I do for the prop_name variable?
i just became a member, and im trying to figure out how to post as a member on here... can someone let me know, thanks
You have to join this community. Go here for details on how to join.
i meant a just became a member of the lj_clients, not of livejournal. ive had LJ for a while, but i just joined the lj_clients the other day, but i dont know how to post onto the lj_clients page...to ask for help
it depends...if you just use the Web Client, you want the FULL set of update options, or "http://www.livejournal.com/update.bml?mode=full", you can go to the the OPTIONAL SETTINGS section, and choose "LJ_CLIENTS" in the "journal to post in" drop-down box. If you are using something like the Windows update client, there should be a "select active journal" option somewhere, and from there you can select "lj_clients". hope this helps! -bobert
well, i wanted to become a member of this to post and ask questions, but my questions have been answered just commenting, so ill just ask my question here... Can anyone tell me how to log IP addresses that have visited my page? I know how to track IP addresses when they comment, but I would like to see who has visited my page, and how often, when they dont leave comments. If you know what I mean and you can help me out, please let me know. Thanks | |