Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




CURL To Post Form Data To Another Site


Is there a way to use CURL to post form data to another site and make the URL change from the current php script to the url of the site that I curl to? Right now when i test this the URL remains as the name of mu script ... ie> www.mysite.com/curl.php instead of changing to the address I am doing the curl to. I tried setting this variable curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); but it only changes to the new sites URL when I click a link on that site.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Post The Data From A Form To A Web Page Of Other Site
I WANT TO POST THE INFORMATION FROM MY FORM AFTER TAKING INPUT FROM THE USERS TO A WEBPAGE( PAYMENT PROCESSING SITE) WITHOUT VISTING THAT PAGE. I MEAN THE WEBPAGE SHOULD NOT BE DIRECTED TO THAT WEBPAGE(PAYMENT PROCESSING SITE). THE RECEPIENT WEBPAGE (payment processing page) RECEIVES THE INFORMATION THROUGH "GET" METHOD OF THE FORM. SO WE CAN USE "GET" METHOD IN OUR FORM.

Unable To Login And Post To A Site Via Curl
There is a social bookmarking site here: http:// onlywire.com that I'm
trying to login and post to via curl.

It's using ajax and I haven't been able to figure out how to post to
it so far.

This is actually the first time I've ever seen a page that I can't
post to with curl.

CURL To Pull Data From A Site
I've been using php and cURL to pull data from a site, and things worked just fine. however, when i used the same script to access a different site, not data is being returned. however, i can go to the url of the site being used and there is clearly html there which should theoretically be scraped. any idea why it is not being gathered and how can i fix this?

How To Attach POST Data To CURL
I'm trying to use CURL to submit XML requests to web service API's.  I've got everything working except that I can't figure out how to actually attach my own custom XML string request to the POST.  As such, I'm getting XML responses that simply say 'Invalid Request'. Here's what my CURL function currently looks like: Code:

Form Submission (no Button) Using PHP+cURL+ Transfer Control To Other Site
I'm trying to send data using the POST method and also have control of the browser be turned over to the website that's receiving the POST data (note that this is NOT the same as sending the data via POST method and then redirecting to the website after). I need it to work exactly like hitting the submit button on an html form, and I need it to work from PHP. It needs to POST the data to the site and also let the other site have control at the same time.

I've tried a couple of methods using both cURL and an fsocket function, but it seems like in both cases that (1) the data gets sent to the other site first, (2) then my program gets a response back, (3) and then it redirects to the other site afterwards. The data gets sort of POSTed to the other site (I get a 200 response back, and I get info showing it was posted correctly), but since the other site does not get control, it seems to dump (not save) the posted data. Code:

Post Form With Field Containing "curl Curl"
I have a form that posts and 1 field is for a suburb, 1 of the suburbs in our area is "curl curl".

When ever this is entered we get an error message "You don't have permission to access".

Blank Response By Curl When Posting Form Data
Here is my code, and the problem:

$st="...(string to post is formed from different variables read from
file)...";
$lngth=strlen($st);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url2);
$fp = fopen("example_homepage2.txt", "w");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,20);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDSIZE, $lngth);
curl_setopt($ch, CURLOPT_POSTFIELDS, $st);
$page2=curl_exec($ch);
curl_close($ch);
fclose($fp);

Blank Response From Curl When Posting Form Data
Here is my code, and the problem:

$st="...(string to post is formed from different variables read from
file)...";
$lngth=strlen($st);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url2);
$fp = fopen("example_homepage2.txt", "w");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,20);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDSIZE, $lngth);
curl_setopt($ch, CURLOPT_POSTFIELDS, $st);
$page2=curl_exec($ch);
curl_close($ch);
fclose($fp);

I tried both with and without POSTFIELDSIZE option, with same result.
This code works fine for strings smaller than 800 characters (actually
795 or so), but my regular string is just under 13000 characters.
I have uploaded the script to 5 webservers (including my development
machine with Win XP , PHP 5 and Apache 2.2.) and it only works on one.
The rest return a blank page to stare at on the curl post.
Is this some configuration issue, or a curl issue?

Post Data W/out Form
I want to post variables to a php script, but I do not want to use a form to do this... is there some sort of header I can use to redirect and post values to another page?

Cookies and sessions are not an option, URL line ('get') variables can't hold large enough a string...

Form Data Will Not Post
can anyone be so kind as to look at

http://www.mysolution.ws/HYPOCRITE.php

and let me know why it isn't passing the form data to

http://www.mysolution.ws/insertHYPOCRITES.php

for the most part, the scripts were created with
http://phpcodegenie.sourceforge.net/

Sending Form POST Data To SSL
I've seen posts on here before about this, but I could never figure it out. I even downloaded the code that was posted and tried to pick it apart to get it to do just what I need, but never succeeded.

What what I understand it deals with using Sockets and sending the header information. Maybe that's where my lack of knowledge lies.

For a regular post it should be sent to port 80, and for SSL 443 right?

How do you go about forming the header of the data? I've never seen that kind of thing, and I'm guessing that's where I'm goofing up.

I'm trying to set up a test:

index.php posts data to test1.php and then displays the results.

$var1 = 'test'

then test1.php would do something very basic like drop it into a line of text.

"This is a <? echo"$_POST['var1']";?> of the gotspy broadcast system."

So I would assume if everything worked right, going to index.php should return: "This is a test of the gotspy broadcast system."??

Yes, no?

How To Post Form Data After Validation
I'm posting the contents of a html form (I have the html form on the same file as the php mail()) to itself in order to validate and then send an e-mail. However, I'd like it to post it to another php file after upon successful validation. Can someone tell me how to do this?

Just a bit of background - the reason why I'd like to do this is because I have multiple contact us forms on a site, and for efficiency purposes, I'd like to have a single form mail script so that I don't have to keep editing the php.

Form To Insert Mysql Row *and* POST Data
I'm reasonably new to PHP and after searching all over the place can't find anything useful

I need to insert some variables into a mysql row and then POST variables to another web page using the same form

The page i'm posting to is an SSL (bank hosted)ecommerce transaction page which I have no powers to change

I don't have any problems inserting just mysql rows or making html forms to post separately, I just don't know where to start to get the one form to do both.

Email Form Does Not Submit Data In Post Method
I have an email which contains a whole form to be submitted to the php code.
When I use get method, it works properly, but when I make it to POST method, it does not work. Also, same HTML code as an pure HTML page works properly for POST method.
What can be the problem? How can I make the email to submit the data through POST method?
My HTML code for email :

====
<form name="form1" method="post" action="getSurvey.php" target="_blank">
====
My php code :
====
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
====

Sending POST Data To A Remote Form When Cookies Are Involved.
there's this online service where you can fill a form to send SMS messages to cell phones. You know the drill. It's on a Brazilian site. I want to use it from my script, by "emulating" a form, and sending the POST data to their ASP script.

Now, I'm having a hard time accomplishing this. I used a sniffer to see what Internet Explorer was feeding the script with (the complete request headers), and i tried emulating it first with Perl then with PHP, but their server returns a 302 - Object moved message, and doesn't send the SMS message.

I'm not sure if the 302 warning is supposed to be there anyway (if you fill the form normally on their page, it will redirect to the default.asp page, so maybe the 302 message I'm getting is normal). On PHP, using sockets, I'm able to send POST data, for instance, using this: Code:

Passing POST Data On Link Click, And Not Form Button
is it possible to send a form data to a page, using a link instead of a button?

id prefer not to have to rely on javascript, so i would like it to be ras html, or the like..

Php Login To Other Site Using Curl
I want to use php to login to another site and then go to that site using the screen name I was logged into and view a webpage on that site and submit a form and searching for text.

Posting A File To A Site With Curl
How do you post a file to a form with curl?

Site Login Withn CUrl
I am trying to automate a submission I do daily.

Manually, I access a page of the type https://www.signin.example.com/loginForm.html. When I fill the username / password, I am automatically redirected to another https page, of the type https://home.example.com and the page confirms that I am logged in, from there on I can update my posting.

When I am logged in, there are 2 cookies set on my computer, one by home.example.com and one by signin.example.com.

When I log out both cookies are gone.

Now, I am trying to automate that login, and I am using the following script as example: http://curl.haxx.se/libcurl/php/examples/?ex=ebay_login.php

Here is my code:

$id = "id";
$password = "password";
$cookie_file_path = "absolute_server_path/httpdocs/cookiejar/";
$LOGINURL = "https://www.signin.example.com/loginForm.html";
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$POSTFIELDS = 'UserName='.$id.'&hiddenVar1=hiddenVar1Value&UserPass='.$password;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https

$result=curl_exec ($ch);
curl_close ($ch);

echo("Results: <br>".$result);

//post info for login
$LOGINURL = "https://www.signin.example.com/loginForm.html";
$reffer = "https://www.signin.example.com/loginForm.html";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $reffer);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result = curl_exec ($ch);
curl_close ($ch);

echo("Results: <br>".$result);

When I run this code, I don't even get the output from the las echo statement (Results: <br> ...), as the server I query automatically redirects me to the same login page https://www.signin.example.com/loginForm.html, but with no error messages or explanations.

Now, as you can see I attempt to have the cookies created in a folder on my web server, using an absolute path absolute_server_path/httpdocs/cookieJar. Can this be one of the problems, does the cookieJar have to sit in my httpsdocs folder instead of the httpdocs? I set the absolute_server_path/httpdocs/cookiejar/ folder to 997 I believe.

Also, when I post the info for login in the second part of the code, I am not sure if $LOGINURL should be https://www.signin.example.com or https://www.home.example.com?

Also, I am not comfortable wit cUrl at all yet, so I am doing something else wrong.

Calling A Post Script From A Post Script; Curl Works But ...
I am trying to call a php script B from script A.

However, when I do this with curl everything works fine except the url of the script is the url of script A. How can I make the URL the URL of script B.

Is this possible with curl?

CURL Installation Cannot Access Https Site
I am experiencing problems trying to make my curl works. For all other sites, i could able to execute request successfully. However for https site, i received an error vias "curl_error()" method: "Cannot connect to host".

I have compiled curl
    --with-ssl=/usr/local/ssl

and PHP with
   --with-curl=/usr/local
   --with-openssl=/usr/local/ssl

HTTPS Post Without Curl?
I am wondering if it is possible to use fsocketopen() to post data through HTTPS. There are a couple of threads that suggest that it is a possiblity, but others that refute this. Does the browser actually do any encryption? I am just wondering if it is a matter of encrypting the data correctly, if OpenSLL would work.

CURL + POST Method
I am currently coding a small script to put data to other website by "curl" this web site cgi script. OK, now let me introduce some backgrounds. The PHP variable of the url of the CGI script on that site is: $url = "http://www.example.com/index.cgi?";

Original CGI on that example.com site read the form data data_a and data_b in <input type=text> and <input type=textarea> by POST method. Two data I need to fill to this CGI script by my PHP script are: Code:

CURL, Header & POST.
How can I make a redirection (like a header('Location:/xxx') ) with
post values ?

HTTP POST With CURL
I'm receiving post from various vendors...and I'm trying to send a response back to them saying whether I received the post sucessfully or not. My thoughts were to use CURL. I'm not totally clear as to how I should handle this but this is what I did.

I collected the info posted to one page then via CURL I redirected the information to another page that says wether or not the the post was successful and based on wether it was successful or not then the script is redirected to a confirmation page.

My biggest issue is I'm trying to send a response to the server that posted to me saying wether or not the post was successful.

Curl And XML Post To Suppplier
I have been having problems with an xml post to a suppliers website. i was getting a returned "Document Error", but after reading this post.

I have now got past one problem and i am now faced with another after adapting the code posted in the above link.

This time my error is "Wrong Number of Lines, or Line missingLINE ERROR".

I have contacted the supplier and they said the xml I sent to them in an email was correct, but as they dont know php they couldnt help me with why I was getting this problem.

here is the full code i am using:

$request = '<?xml version="1.0" standalone="yes"?>
<order>
<header>
<securitycode>testcode</securitycode>
<orderref>TEST IGNORE</orderref>
<orderdatetime>'.date("m/d/Y H:i:s").'</orderdatetime>
<daterequired>'.date("m/d/Y").'</daterequired>
<deliveryaddress>
<deliverycontact>MR Smith</deliverycontact>
<deliveryname>Smith Shops</deliveryname>
<addressline1>addressline1</addressline1>
<addressline2>addressline2</addressline2>
<addressline3>addressline3</addressline3>
<addressline4>addressline4</addressline4>
<postcode>AA1 1AA</postcode>
</deliveryaddress>
</header>
<line>
<lineno>1</lineno>
<tlcpartno>PF7SS320</tlcpartno>
<quantity>10</quantity>
</line>
</order>'

// Create Headers
$header[] = "Host: www.supplierswebsite.com";
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($request) . "
";
$header[] = $request;

// Send using CURL
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "https://www.supplierswebsite.com/getxml.asp?action=ORDER&account=testing"); // URL to post
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); // return into a variable
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ); // headers from above
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$result);

$result = curl_exec( $ch ); // runs the post
curl_close($ch);

echo $result; // echo reply response

as mentioned above, the $result returns - "Wrong Number of Lines, or Line missingLINE ERROR"

any ideas where i am going wrong?

Maintaining Session After POST With CURL
Here's what I want to do: When a user enters in some data that is invalid, I send them back to the page they just left with all values still in tact... pretty simple, right?
I'm trying to use cURL (if there's a better way, let me know). The code I'm using is:
PHP Code:

Secure Post With PHP And Curl (to Paypal IPN)
I have 2 problems, 1 of which is tied to PHP and 1 loosely tied, so
I'll put this out there.

Got a problem that I have been working on for a while now which
involves implementing the Paypal IPN. I am using PHP 4 to automatically
post back to Paypal and I am using curl package.

I am doing a Custom request and would like to know if anyone has
successfully posted data back to paypal with curl and got something
other than INVALID back. I am always getting INVALID!! :(

I am doign EVRYTHING they tell me to.. ie ordering the parameters and
adding the cmd=_notify-validate

I guess I have 2 questions:

1. Am I using curl properly with this paypal interface or is there
something I am not setting.
2. Has anyone a working version with HTTPS/curl/paypal. I am using the
https://www.eliteweaver.co.uk/testing/ipntest.php to test this.

The code is as follows:

// put all POST variables received from Paypal back into a URL $post =
array();

foreach ($this->paypal_post_vars as $field => $value) {
array_push($post,$field."=".rawurlencode(stripslashes($value)));
}

array_push($post,"cmd=_notify-validate");
$uri = implode("&",$post);
$ch=curl_init();
$this->error_out($uri);

curl_setopt($ch, CURLOPT_URL, $this->url_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $uri);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$this->paypal_response = curl_exec($ch);
$this->error_response = curl_error($ch);
curl_close($ch);

$this->error_out($this->paypal_response);

Posting Xml With CURL (post Header)
How can i create cURL post with these headers?

POST /xml.dll HTTP/1.0
UserAgent: IE6
Content-Type: text/html
Content-length: #counter goes here

what CURLOPT_'s i should use for posting?

Using CUrl To POST To Listening IP/port
i need to handle CSV requests/responses for two FedEx products

FedEx Web Integrated Solutions - requests are posted to a remote FedEx hostFedEx Ship Manager Server - requests are posted to a local listening IP/port
i have successfully posted to WIS using the cUrl method as shown:

$ch = curl_init();
curl_setopt($ch, CURLOPT_PORT, $port);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_URL, $server);
$reply = curl_exec($ch);
curl_close($ch);
echo $reply;

i used the following as my vars. as you can see, i send the request to a URL:

$server = "https://gatewaybeta.fedex.com/GatewayDC";
$port = "443";
$data = "csv,'data',goes,'here'";

finally, this is what i'm trying to accomplish. i would like to post a CSV transaction to a local IP/port that is running the FedEx Ship Manager like this:

$server = "127.0.0.1";
$port = "2000";
$data = "csv,'data',goes,'here'";

when i use the vars above, the script times out. i have several programs that access FSMS with Java socket classes, so i know that the port is open. all of the software is hosted on the same PC, so there aren't any network issues to worry about...

i would like to know if this is the proper way to submit data to a listening port via PHP. i'm not sure if i should even be using cUrl; according to the PHP manual, cUrl accepts HTTP, HTTPS, FTP, GOPHER, TELNET, DICT, FILE, and LDAP protocols. FSMS is built on Java, and there isn't very much documentation on the software (only 900 or so customers use it).

Secure Post With PHP And Curl (to Paypal IPN)
Got a problem that I have been working on for a while now which involves implementing the Paypal IPN. I am using PHP 4 to automatically post back to Paypal and I am using curl package.

I am doing a Custom request and would like to know if anyone has successfully posted data back to paypal with curl and got something other than INVALID back. I am always getting INVALID!!

I am doign EVRYTHING they tell me to.. ie ordering the parameters and adding the cmd=_notify-validate

I guess I have 2 questions:

1. Am I using curl properly with this paypal interface or is there something I am not setting.

2. Has anyone a working version with HTTPS/curl/paypal. I am using the
https://www.eliteweaver.co.uk/testing/ipntest.php to test this.

The code is as follows:

// put all POST variables received from Paypal back into a URL $post = array();

foreach ($this->paypal_post_vars as $field => $value) {
array_push($post,$field."=".rawurlencode(stripslashes($value)));
}
array_push($post,"cmd=_notify-validate");
$uri = implode("&",$post);
$ch=curl_init();
$this->error_out($uri);
curl_setopt($ch, CURLOPT_URL, $this->url_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $uri);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$this->paypal_response = curl_exec($ch);
$this->error_response = curl_error($ch);
curl_close($ch);
$this->error_out($this->paypal_response);

Redirecting To Target Page Along With POST With CURL...
I want to send some POST data with cURL and then also redirect to the location where Im sending the POST data. Ive been running around like crazy and unable to find a way. This must be something very simple. Heres what I have thus far, except this doesnt redirect to my target page. Code:

A Good Way To Post Articles On A Site
hi,
i have setup a site for a parenting publication that has over 1400 articles. Originally they were html files and i then moved them over to PHP utilizing includes and such. We currently use picosearch to index all the files which allows the visitors to search the articles. So, i now wanna git rid of picosearch and setup my own search. But before i do this i want a logical way for the pages to come up on the site. Im thinking the way to go is to create a template, then go into the article admin which will then take that template rename it and add the article ID to it, is this the way to go?

I know how to copy files, but dont know how to rename and save the file with the article ID in it.

Simulate Send Data With POST And Get Data From A Web Page (whith A Session)
I'd like to get text of a webpageB that I reach by putting
a login and a password in a webpageA.

I mean:
I'd like to get text of a WebPageB with a php script.
But before I can see WebPageB I have to autenticate myself
in a WebPageA writing my login and my password in a form,
the host recognise me and (by session) let me see the WebPageB.

The question is:
1)how to simulate send data (login an password) in form with a PHP script?
2)how to navigate in a Web usin the same session?

Post And Redirect With Post Data
The solution we have though up is the following:

1. The user fills in data in a form and hits submit
- This submits (POST) to another page (redirect.php)
2. redirect.php adds more POST data to POST and then submits all this POST data to another page (offsite [payment portal])

The reason why we have to do this is for someone who knows our to read html source code, could easily find the sucessful page which will then do the processing we need to do on our side. Which means freebeis.

Need To Do A 'Post A Video' Site (embed Only.) Security Issues
I am about to start one of those post your favorite youtube/liveleak /... video. It will be vbulletin integrated and I need to make sure that my programmer doesn't forget anything that could cause me to get hacked or whatever.

What things can get overlooked, yet are vital to security? Once again, the videos will be hosted by others.

Would a "Allowed to post from" domain list be smart? They will also be ratings and comments (so I can get as much text as possible.)

CURL Form Posting To Self Referencing Form Action
I've successfully used CURL to maneuver around and through sites
but a new site I've been trying to work with has got me stumped.

To retrieve the data I'm trying to get a login is required. If
you go to any page in the "member" area without logging in you
get directed to a https connection and hit login.php (ie: you
end up at https://www.domain.com/login.php). The problem, I
believe, lies in the fact that the form on that page references
itself in the form action tag.

The action tag in the form is "/login.php" and nothing I've tried
has been successful in getting CURL to actually submit the data
and get me logged in. Not surprising really since you'd normally
point CURL to the action target to pass form data.

The things I've tried so far without luck are:

* Hit the main site page to pick up the session cookie then go
to one of the "member" only pages

* Gone directly to one of the "member" pages to get redirected
to login.php

Both attempts end up simply returning me the contents of the
login.php page which, obviously, doesn't help or do any good.

What isn't clear from the CURL documentation with PHP is whether
or not the CURLOPT_POSTFIELDS get passed to pages after a redirect
takes place. I suspect they are but the fact that login.php
refers back to itself seems to be the real problem.

If anyone has any ideas on how to convince CURL to get me past
login.php or any other suggestions on things I could try I would
very much appreciate it.

CURL/PHP - Outputting Different Data
I would like multiple, different urls / proxy servers / proxy ports to be submitted, all on the same script (without having to create any other files).

function file_get_contents_proxy($szURL, $szProxy, $iProxyPort)
{
    $pCurl = curl_init($szURL);
    curl_setopt(CURLOPT_PROXY, $szProxy);
    curl_setopt(CURLOPT_PROXYPORT, $iProxyPort);
    curl_setopt(CURLOPT_FOLLOWLOCATION, true);
    curl_setopt(CURLOPT_RETURNTRANSFER, true);
    return curl_exec($pCurl);
}
............

Posting Form Data And Also Allow To Download Form Data
i have a client that whats to post form data to a database but he also wants users of the script to download it aswell how will i got about doing this i thought about it that i could make it save it into a txt file then echo the download link is there any ideas? because to post it to a txt file it would be posting 2 places is there a way to do this? Code:

Curl Question - Get A Page With Already Posted Data
I would like to get a page with already posted data. I use such code.

$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

$ch = curl_init();....

Site Does Not Stop Transfering Data
When I click on a button to access a page I created with PHP and MySQL the status bar at the bottom of the browser continues to indicate it is transfering data from the server.

CURL - Form Related
I want a page which I can host where users fill in a form and the same data is sent to a form hosted remotely. I then want it to simpy display another page that I'm hosting.

So not like:

form fill--->> ends up going to there site
form fill--->> submits data to that form>>back at my site.

The form on there site looks like:

Search Site Using Referral Data From Google
I came across a script to use the referral data from search engines (or at least google) to search with in your own site, It didn't seem like that amazing of a idea at the time but now I've changed my mind and I want the script, does anyone know where to find it?

Post Data To A CGI
How in PHP do you send post data to a CGI and let the CGI carry on the request (what I'm doing is: a form is filled out a load of PHP to check that each option is correct and some other stuff then when its ready redirects off to a CGI but sending the form data with it (using a post rather than a get).

Is It Possible To Post Data Through Url?
Is it possible to post a value to a database through a url? Something like PHP Code:

Raw POST Data
Is there a way to access the raw data sent to a PHP app via POST? I'm
trying to read the XML sent by a Flash program with XML.send() and its sent
via POST but not URL encoded. PHP is expecting URL encoding so it comes in
like:

$_POST['<?xml version'] = '"1.0"?>'

Perl can read it just fine like so:

read (STDIN, $rawpost, $ENV{'CONTENT_LENGTH'});
s/&amp;/&/g;

POST Data
I am trying to build a checkout process for my site that goes from filling in ship and bill info to confirm order info. The problem I am having is that I want to be able to skip the first step if the client already has an account and has signed in. This would be easy except I am posting the data from step1 (ship/bill info) on my form like:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>?step=2" method="post" name="frmCheckout" id="frmCheckout" onSubmit="return checkShippingAndPaymentInfo();">

the onSubmit goes to a js function that will send the user back to step1 if data is missing.

in my confirm.php I check to see if the steps are being served up correct like
<?php 
if (!defined('WEB_ROOT')
    || !isset($_GET['step']) || (int)$_GET['step'] != 2
|| $_SERVER['HTTP_REFERER'] != 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?step=1') {
exit;
}

which works well for making sure that the user who is not logged in gives me all the required data - but also prohibits me from skipping step 1

I do set a session variable for ClientId - once logged in - so is there any way that I could add that to the condition so that I could skip step 1 ?? and how should I deal with the POST data normally retrieved from step1??

Post Data
im writing a small forum here, i have used a get to grab the button input to post a message, then it goes to a screen to post the data into mysql but im not sure the best way to deal with the post data once submitted: Code:

Get Form Elements From A Page Using Curl
I am trying to get all form elements on any page using curl. I can get the data no problem but I think the preg_match_all is all screwy because I don't get the results I want. Here is my code: ....


Copyright © 2005-08 www.BigResource.com, All rights reserved