cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: hi all :) please help >>>>

From: beshoo <beshoo_at_beshoo.com>
Date: Sun, 3 Feb 2002 22:58:58 +0300

OK ....
I think you understand my problem :(
see with me please.
I have a PHP script it is make a POST to a web application it is a FORUM
My script is on my Vhost it is a Normal web host like any one over the net
:) but it is support cURL
OK.
but the target forum wont me to go there site to make the post but what I
like is to make the POST from my server.
Just to practice on POST by cURL
the target forum make a BLOCK on my web host ip
so I can not make any POST by my web host to that forum. cos they BLOCK my
web host IP address.
Hope you understand me .
OK
what I think that I can post MY data using some proxy(s) address cos what I
know that if I use Proxy the IP address will be
for Proxy that I use it :) (Sorry for my bad English)
I test that using this code :
--------------------------------------------------------
<?php
$ch = curl_init();
// the target site I wont to POST my data to :
curl_setopt($ch, CURLOPT_URL,"http://www.google.com");
// the proxy that i use it:
curl_setopt ($ch, CURLOPT_PROXY, "12.151.162.12:8080");
// I dont know if this function has to be used:"HTTPPROXYTUNNEL"
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
// Post command
curl_setopt($ch, CURLOPT_POST, 1);
// the VAR in the post command
curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1");
curl_exec ($ch);
curl_close ($ch);
?>
--------------------------------------------------------
when I Test the script that I made it I have some thing odd :)
actually it is work but what I have is look like when u type some url and
the url is on the PROXY Blocked list
and it say that the proxy can not access the page
but u have to know that if you test the page on a normal conection using
that proxy the page will be work fine !!!!
I Do not know if I become clear with this section of my problem may be my
bad English is my problem :) SORRY FOR THAT that what is happened with me
hope you help me
and by the way can you test my script please to see what I have :)
Please and I will be appreciative for you Mr.Daniel .
------------------------------------------------------------------
beshoo

----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
To: "curl and php list" <curl-and-php_at_lists.sourceforge.net>
Sent: Tuesday, February 04, 2003 6:05 PM
Subject: Re: hi all :) please help >>>>

> On Sun, 3 Feb 2002, Walid Al Masri wrote:
>
> > Thank you for you helpfull information :)
>
> It's not easy being helpful when you don't tell us what your problem is.
>
> > please help me to find how can I write the correct code using
curl_setopt
> > ($ch, CURLOPT_HTTPPROXYTUNNEL, 1 );
>
> I doubt very much that you want to use that option.
>
> Using that method, curl will use CONNECT to the proxy and then fire off
GET
> to it, assuming it will be tunneled to the remote host. If you can't make
it
> work using the normal proxy way, I can't see how this will work.
>
> --
> Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
>

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-02-04