Jump to content

[SOLVED] cURL/PHP - Outputting Different Data


clookid

Recommended Posts

Yes, it was the same before.

 

http://del.icio.us/clooscript01

 

What we are attempting to do is to get the script to work, so that it actually submits the website to del.icio.us

 

If that were the case, I would just code:

 

echo "<a href='http://www.ipsecured.info' alt='IP Secured'>IP Secured</a> has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01</a>.";

  • Replies 70
  • Created
  • Last Reply

Your task is done.

I remodified the arrays.

 

<?php

function file_get_contents_proxy($szURL,$szProxy)
{
$pCurl = curl_init($szURL);
curl_setopt($pCurl, CURLOPT_PROXY, $szProxy);
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($pCurl);
if($pCurl)
{
echo "<a href='$szurl' alt='$title'>$title has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01.";
}
}

$password = "******";

$title = "IP Secured";

$url = "http://www.ipsecured.info";
$description = "IP%20Secured";
$note = "IP%20Secured%20--%20you%20no%20longer%20need%20to%20worry%20about%20filters.";
$tags = "ip%20secured,%20proxy";

$servers =array("https://clooscript01:".$password."@api.del.icio.us/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes");
$proxies =array("192.17.239.250:3127");


for($i=0;$i<count($servers);$i++) {
file_get_contents_proxy($servers[$i],$proxies[$i]);
}



?>

I am not getting any errors at all. I understand that the link has been submitted but it was obviously when you or I, for that matter, were fiddling around with different codes. I have deleted the submission and have tried to add it again (using an unmodified version of your script), but I have failed.

<?php

$servers = array("https://clooscript01:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes");
$proxies = array("192.17.239.250:3127");

$password = "***";

$title = "IP Secured";

$url = "http://www.ipsecured.info";
$description = "IP%20Secured";
$note = "IP%20Secured%20--%20you%20no%20longer%20need%20to%20worry%20about%20filters.";
$tags = "ip%20secured,%20proxy";

function file_get_contents_proxy($servers, $proxies)
{
$pCurl = curl_init($servers);
curl_setopt($pCurl, CURLOPT_PROXY, $proxies);
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($pCurl);
}

for($i=0; $i<count($servers); $i++) {
file_get_contents_proxy($servers[$i], $proxies[$i]);
}

echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01.<br />";

?>

 

This works. How do I add a second submission, though?

I have added two ips.. you can add the remaining as shown.

 

<?php

$servers = array("https://clooscript01:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes","https://clooscript02:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes"
$proxies = array("192.17.239.250:3127","128.8.126.112:3124");

$password = "******";

$title = "IP Secured";

$url = "http://www.ipsecured.info";
$description = "IP%20Secured";
$note = "IP%20Secured%20--%20you%20no%20longer%20need%20to%20worry%20about%20filters.";
$tags = "ip%20secured,%20proxy";

function file_get_contents_proxy($servers, $proxies)
{
$pCurl = curl_init($servers);
curl_setopt($pCurl, CURLOPT_PROXY, $proxies);
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($pCurl);
}

for($i=0; $i<count($servers); $i++) {
file_get_contents_proxy($servers[$i], $proxies[$i]);
}

echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript02'>clooscript02.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript03'>clooscript03.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript04'>clooscript04.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript05'>clooscript05.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript06'>clooscript06.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript07'>clooscript07.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript08'>clooscript08.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript09'>clooscript09.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript10'>clooscript10.<br />";


?>

Yes, but when you add a second domain, none of them work. :'(

 

Visit: http://www.ipsecured.info/test.php

 

Source:

 

<?php

$servers = array("https://clooscript01:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes","https://clooscript02:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes");
$proxies = array("192.17.239.250:3127","128.8.126.112:3124");

$password = "*******";

$title = "IP Secured";

$url = "http://www.ipsecured.info";
$description = "IP%20Secured";
$note = "IP%20Secured%20--%20you%20no%20longer%20need%20to%20worry%20about%20filters.";
$tags = "ip%20secured,%20proxy";

function file_get_contents_proxy($servers, $proxies)
{
$pCurl = curl_init($servers);
curl_setopt($pCurl, CURLOPT_PROXY, $proxies);
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($pCurl);
}

for($i=0; $i<count($servers); $i++) {
file_get_contents_proxy($servers[$i], $proxies[$i]);
}

echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript02'>clooscript02</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript03'>clooscript03</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript04'>clooscript04</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript05'>clooscript05</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript06'>clooscript06</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript07'>clooscript07</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript08'>clooscript08</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript09'>clooscript09</a>.<br />";
echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript10'>clooscript10</a>.<br />";

?>

 

Visit: http://del.icio.us/clooscript01

 

The script has not worked...

<?php

$servers = array("https://clooscript01:[email protected]/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes");
$proxies = array("192.17.239.250:3127");

$password = "***";

$title = "IP Secured";

$url = "http://www.ipsecured.info";
$description = "IP%20Secured";
$note = "IP%20Secured%20--%20you%20no%20longer%20need%20to%20worry%20about%20filters.";
$tags = "ip%20secured,%20proxy";

function file_get_contents_proxy($servers, $proxies)
{
$pCurl = curl_init($servers);
curl_setopt($pCurl, CURLOPT_PROXY, $proxies);
curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($pCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($pCurl);
}

for($i=0; $i<count($servers); $i++) {
file_get_contents_proxy($servers[$i], $proxies[$i]);
}

echo "<a href='$url' alt='$title'>$title</a> has successfully been submitted to <a href='http://del.icio.us/clooscript01'>clooscript01.<br />";

?>

 

The above script works. When you add a second url, it mucks up everything. ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.