Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
MaxDangerMouse
- Posts: 19
- Joined: Wed Jan 26, 2011 7:04 am
- Location: Melbourne
Post
by MaxDangerMouse » Thu Aug 30, 2012 4:20 am
Hi,
I've used a post command to fill in the login form on a website.
Code: Select all
post "login_form_user=****x&login_form_pass=****" to URL "http://****.****.org.au/"
put it into field "results"
It seems to kind of work - but only gives me the first part of the web page I'm trying to access - I can only see the html code for the header not the rest of the page.
Am I doing something wrong?
Thanks
Max
-
shaosean
- Posts: 906
- Joined: Thu Nov 04, 2010 7:53 am
Post
by shaosean » Thu Aug 30, 2012 5:03 am
Maybe the content body is empty.. You will need to look at the header information to see what is up.. Feel free to post it and we can take a look to see if something is missing or if it is working correctly..
-
MaxDangerMouse
- Posts: 19
- Joined: Wed Jan 26, 2011 7:04 am
- Location: Melbourne
Post
by MaxDangerMouse » Thu Aug 30, 2012 5:12 am
Thanks
Here's what comes back as the content
Code: Select all
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Log in | ProjectSend</title>
<link rel="shortcut icon" href="http://ieudata.tln.org.au/favicon.ico" />
<link rel="stylesheet" media="all" type="text/css" href="http://ieudata.tln.org.au/styles/shared.css" />
<link rel="stylesheet" media="all" type="text/css" href="http://ieudata.tln.org.au/styles/base.css" />
<link rel="stylesheet" media="all" type="text/css" href="http://ieudata.tln.org.au/styles/font-sansation.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript" ></script>
<script src="http://ieudata.tln.org.au/includes/js/jquery.validations.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
<div id="lonely_logo">
<h1>ProjectSend</h1>
</div>
</div>
<div id="login_header_low">
</div>
<div id="main">
I'm confused because it's different when I use those details I'm POSTing to actually login to the website. I get a lot of content that way and the source code HTML is much more than I get delivered this way.
-
shaosean
- Posts: 906
- Joined: Thu Nov 04, 2010 7:53 am
Post
by shaosean » Thu Aug 30, 2012 9:41 am
Looks like it is coming back, but the "put" command seems to not have the full HTML document.. I will go through the code of libURL to see if there is something in there that is not working..
-
shaosean
- Posts: 906
- Joined: Thu Nov 04, 2010 7:53 am
Post
by shaosean » Wed Sep 12, 2012 6:43 am
I guess I forgot to post an update.. I did go through libURL and nothing jumped out at me, but I have not had time to go through it to debug it all and I probably won't (sorry, I just really do not spend much time in Rev any more).. I know in past projects I have not bothered with libURL and just wrote my own HTTP libraries to handle the tasks needed (single purpose use) and it really is not all the difficult, plus you can make it non-blocking..
-
sturgis
- Livecode Opensource Backer
- Posts: 1685
- Joined: Sat Feb 28, 2009 11:49 pm
Post
by sturgis » Wed Sep 12, 2012 2:53 pm
I'm wondering if you need to set custom headers. Like sending a cookie back, or a session id or something of that nature.