?

Log in

No account? Create an account
Sorry for not being more specific with my last post...I am having… - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Mar. 3rd, 2002|09:56 am]
LiveJournal Client Discussions
lj_clients
[bobert225]
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
linkReply

Comments:
[User Picture]From: thelovebug
2002-03-03 07:43 am (UTC)
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 :-)
(Reply) (Thread)
[User Picture]From: fuchs
2002-03-03 08:29 am (UTC)
...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";
(Reply) (Parent) (Thread)
[User Picture]From: thelovebug
2002-03-03 09:52 am (UTC)
D'oh! I missed that one! :-\
(Reply) (Parent) (Thread)
From: bobert225
2002-03-03 11:24 am (UTC)
thanks guys, i really appreciate it. also, one other question: what do I do for the prop_name variable?
(Reply) (Parent) (Thread)
From: rucce81
2002-03-04 09:19 am (UTC)
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
(Reply) (Thread)
[User Picture]From: thelovebug
2002-03-05 04:11 am (UTC)
You have to join this community.

Go here for details on how to join.
(Reply) (Parent) (Thread)
From: rucce81
2002-03-05 07:14 am (UTC)
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
(Reply) (Thread)
From: bobert225
2002-03-05 11:49 am (UTC)
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
(Reply) (Parent) (Thread)
From: rucce81
2002-03-06 06:01 am (UTC)
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
(Reply) (Thread)