473,788 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

filling out forms through proxies with php

i'm connecting to the internet via a proxy, and am having problems
filling out forms... below is the code i have, and below that is the
http request i am trying to make it look like. they look the same to
me, but it isn't working, so i guess they aren't...

$proxy = fsockopen("tcp://someaddresshere ", 80, $errno,
$errstr);
$temp = "somethingelse= blablabla";
fputs($proxy,"G ET somesite HTTP/1.0\r\n");
fputs($proxy,"A ccept: */*\r\n");
fputs($proxy,"R eferer: http://someothersitesi te\r\n");
fputs($proxy,"C ontent-Type:
application/x-www-form-urlencoded\r\n" );
fputs($proxy,"C ontent-Length: " . strlen($temp) . "\r\n\r\n") ;
fputs($proxy,$t emp . "\r\n");
while (!feof($proxy))
print fgets($proxy);
fclose($proxy);

with that script, i don't get anything. however, with this http
request, from opera 7.10, i do:

POST http://somesite HTTP/1.0
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera
7.10 [en]
Host: somesite
Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap,
*/*;q=0.1
Accept-Language: en;q=1.0
Accept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://someothersite
Proxy-Connection: close
Content-type: application/x-www-form-urlencoded
Content-length: xx

somethingelse=b lablablaHTTP/1.1 200 OK
Via: 1.1 DELTANS
Connection: close
Content-Type: text/html
Date: Fri, 20 Jun 2003 17:54:37 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
OpenSSL/0.9.6b DAV/1.0.2 PHP/4.1.2 mod_perl/1.26
X-Powered-By: PHP/4.1.2
Set-Cookie: PHPSESSID=6c6ba ebea48c1ee4ad56 2d7fef3a46a4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Set-Cookie: something
Set-Cookie: something

now the last part of the http request isn't a request persay, but
whatever, hehe :)

anyways... any ideas as to what i'm doing wrong? thanks! :)
Jul 16 '05 #1
0 2236

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2615
by: hboothe_no_spam | last post by:
Hello, all, I've read through both of the groups I'm posting to, and all over the groups, regarding filling PDF forms with data from VB. I have Acrobat 5 (and the SDK), and am using VB 6. I can successfully place data in a field with code like the following (leaving out declarations for brevity): Set AdPre = CreateObject("AcroExch.AVDoc") AdPre.Open "c:\test.pdf", "Foo" Set formApp = CreateObject("AFormAut.App") Set acroForm =...
10
2410
by: Clive Backham | last post by:
I tried posting this on comp.infosystems.www.misc, but that group appears to get very little traffic. So now I'm trying here. If there is a more appropriate group, please let me know. I'm interested in how cacheing web proxies are expected to behave with regard to pages that change. After changing the content of a simple web site I have, I discovered that the cacheing web proxies at at least one ISP I have access to did not refresh their...
1
2208
by: Krzysztof Karnicki | last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show rows painted by me self. Because dates taken from database are very large, and filling DataSet bounded to this DataGrid takes some time, a decided to put fill logic into new thread. And so method running in this thread clears only this DataSet bounded to DataGrid and fills it once more...
4
20634
by: Molina | last post by:
Hi !!! I have a VB.Net application that consumes an WebService. The problem is that the HTTP address works fine, but it will change to an HTTPS address, and it isn't working. The weird thing is that I could add the WebReference and view the WSDL in my browser (even in my iPaq Internet Explorer) without any problem, when I try to consume the WebService I get the following error message: "The ServicePointManager does not support proxies...
6
3497
by: | last post by:
Hi, can someone provide some advise on how to get around with using auto generated proxies? basically I already have the proxy classes, and they are used by other places. I'd like use these existing classes instead of having to generate another set of proxy classes, which are going to be very similar to my existing classes. any idea? thanks, -Jason
1
2769
by: tomazi75-nospam(at)gmail.com | last post by:
Hello all, I've a problem using urllib2 with a proxy which need authentication. I've tested the 'simple way' : -- code -- import urllib # example values for the post
1
1190
by: John | last post by:
Is there an automatic way of filling forms that have been generated using javascript? I tried to use python+mechanize but am having trouble with javascript forms. This is the way the form is created: <script src="/WebResource.axd?d=uz45jgd0NVyzsVJV_sZDrjxBvvX2yHd3hs2IGgfXLN3pPD65PTl8Gec4qFJa35leX_j-S-HQNzQg1sDk82eQYafpf0w9zI7HaoMUnMjb9ihQ96Tf0qvT-Air__85j5db0&amp;t=632972974720000000" type="text/javascript"></script>
3
1314
by: Thirdworld | last post by:
I'm building my first database and I'm having trouble using data as a reference on different forms. Is there any way that data submitted by one form could be used immediately as a reference for filling out data in subsequent forms?
2
3085
by: Toni Pohl | last post by:
Hi, some years ago I´ve implemented an classic ASP form which fills in data from a database into a PD-form. I used the free FDF Toolkit which worked very well. After submitting the PDF the asp-form reads the data of the datafields and write them into the database again. Now I want to implement an improved ASP.NET version with VB.NET and I found iText.net. - FDF seems to be completly outdated?
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.