Working with Curl

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dnowland
Forum Newbie
Posts: 1
Joined: Fri Feb 26, 2010 5:04 pm

Working with Curl

Post by dnowland »

Hello there,

I am developing a web application that will allow a user to submit their url to several free link directories via an iframe control I am able to load the iframe and autofill the form controls but I need to be able to submit it back again using the same curl connection.

to load it is use my proxy script i.e: proxy.php?url=XXXXXXXXXX

now I need to access the same connection to post the data back can someone suggest how I can access the connection again

my Proxy code is below:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
$output = curl_exec($ch);

curl_close($ch);

I appreciate any help that you can give me.
Post Reply