PHP Code to Check if Someone is Coming from a Open Proxy.

June 11th, 2008

php open proxy check

As some of you know I’ve been moving to building my own offers and some other things on the advertisers side I’ll sharing later. In this quest I’ve found the most challenging thing is to flush out the fraud from the legitimate users. Everyone thinks being an advertiser is the way to go right? Affiliates send traffic and you pay them 5$ and you make 7-10$. Well if only it was that easy. Honestly being the advertiser or network would be the greatest thing since sliced bread if there wasn’t so much affiliate fraud. Now I’m not talking about Blackhat tactics or spam traffic generation stuff. I’m talking straight fraud such as stolen credit cards and lead stuffing. There’s large organized rings of fraudsters primarily in China, India, Phillipines, Vietnam, Russia, Turkey and a few other countries. So if any of my readers on from those countries and get denied for networks and offers a lot that’s why.

Why you should care

Fortunately most of the fraudsters aren’t that sophisticated from what I’ve seen, so there’s a lot of ways to flush them out of the bushes and cut your losses before they start. There’s very good reason to catch them “Before” they start. As an advertiser the last thing you want is a large number of charge backs or stolen credit cards running through your system. If enough of this happens you can be blacklisted for any merchant account. Therefore the prevention of these transactions going through is a good place to begin.

One of the hard parts about owning a network or running an offer is the careful balancing act between what you let through and what you block. You could lock down your affiliate approval or purchase system tighter then a drum and approve hardly anyone. Or you could let everyone through but these are extremes of the spectrum of course. So the goal is to build little checks in to weed out most of the fraud before it starts. One thing I’ve chosen is anyone signing up with a proxy is going to get denied. If you can’t signup with your real IP I don’t want to do business with you. Maybe I’m going to knock out some sales and some affiliates this way but it’s worth it so I don’t have to deal with as much fraud.

Now there’s no way you can block all proxies, I know this but you can weed out the simple ones by checking the regular open proxy ports which are 80, 8080, and 3128. I’ve written a little function that you pass the IP address to and return 0 or 1 based on whether those ports are open on the IP. So that when an affiliate applies or a sale goes through I check if the IP ( address of the computer) is coming from computer that has those ports open. 99.9 out of a 100 home users aren’t going to have any of those ports open.

Just take this code and stick it in your sign up form or registration form and decide how you want to deal with these orders or sign ups. You may want to just throw them into a queue to be manually checked. Or build a rating system based on points. How you handle things is up to you.

PHP Proxy Port Checking Code:

function ipProxyPortCheck($ip){
//timeout you want to use to test
$timeout = 5;
// ports we're going to check
$ports = array(80,3128,8080);
// flag to be returned 0 means safe, 1 means open and unsafe
$flag = 0;
// loop through each of the ports we're checking
foreach($ports as $port){
// this is the code that does the actual checking for the port
@$fp = fsockopen($ip,$port,$errno,$errstr,$timeout);
// test if something was returned, ie the port is open
if(!empty($fp)){
// we know the set the flag
$flag = 1;
// close our connection to the IP
fclose($fp);
}
}
// send our flag back to the calling code
return $flag;
}
// call our function and check the IP in there
echo ipProxyPortCheck('69.217.73.52');
?>

Hope this saves some advertisers and affiliate networks some time and money.

How to Use Pre-Poppable Affiliate Offers

May 24th, 2008

Originally I posted this over at Blackhatworld.com but thought I’d repost it on here for my readers.

Someone asked what is a pre-pop offer and how do I use it?

First of a pre-pop offer means that they allow you to populate the data in the offer with a GET uri. So for example if your form had fields “fname”, “lname”, “phone” your url to pre-pop it might look like this:

http://www.affiliateoffer.com/lander.php?fname=Smaxor&lname=Musings&phone=4082931938

So what this would do is take the user to the landing page with their first name, last name and phone number already filled in so all they have to do is hit submit and makes your conversions go way up. Not all offers support this however a lot do so just ask your affiliate manager what pre-pops they offer.

Pre-Pop is awesome especially if you have a white label or private lable offer you’re promoting. Bascialy once they fill out the first offer, we’ll use a mortgage lead as an example, you forward them to a second page or throw them a pop-up already pre-populated with the data that they filled out from the first mortgage lead offer so all they have to do is hit submit.

Some examples of numbers, when we used to run a lot of mortgage ( sucks now for mortgage ) we’d pre-pop a home owners insurance lead form. 15% would hit submit and we’d get a second 8$ pop for the same lead. Then we’d pre-pop a new window install lead offer and on and on.

1000 leads * 15% = 150 leads additional * 8 = $1200 extra for the same traffic

Good stuff. The other thing pre-pop’s are great for is if you are a mailer and have data then you can make the links that they click on have their info in them already so that when they click and go to the landing page it’s already pre-populated with their info.

So your link in the email might look like this

http://www.offer.com/page.php?name=t…one=theirphone…….

Now you’re conversion is going to go up quite a bit if their form is already filled out with their info. Also if you don’t want to use that big link in a mail or the affiliate url ( always a good idea ) you can send them to your domains and keep a database of records. So for example you use a link like this

http://www.yourdomain.com/jump.php?id=38357

Where 38357 corresponds to a record id in the database. You pull their record and then forward them to the offer with their pre-pop info.
Simple code to do this would be

<?php
// connect to your db
dbconnect();
// pull the id from the uri
$id = htmlentities(trim($_GET['id']));
// build your sql for pulling the record from the database
$sql = "SELECT * FROM records WHERE id = '$id'";
// get the result from the database for the id
$sql_result = mysql_query($sql);
// put that result into an array
$row = mysql_fetch_row($sql_result);
// here we're redirecting the user to the landing page with the pre-pop uri, this is
// assuming that first name is the second field, last name the 3rd field and phone number
// the 4th field.
echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.affiliateoffer.com/lander.php?fname={$row[1]}&lname={$row[2]}&phone={$row[3]}\"/>";
?>

Hope that helps and explains some stuff.

Diorex’s Blog is back Up – But Moved

May 21st, 2008

He has moved it to his own domain. He’s posted all his enlightening archived content posts from the past.

 DIOREX

zxbfwwr – What is it? Number 1 on Google Trends

May 14th, 2008

Thought I’d make a blog post about it and see if the highest trend keyword right now will bring much traffic. My guess is it’s someone gaming Trends. The other thing to watch for is watch the term zxbfwwr in google. See how many results pop up. As of now there’s only 10 where I’m located. So follow this search to see what happens. zxbfwwr

PHP & CURL Forum

May 13th, 2008

Just a quick post about a forum I found today. If you’re looking for other people to talk about CURL and PHP with I came across this forum the other yesterday. Doesn’t seem super active however there might be some answers to your questions in the history.

http://curl.phptrack.com/forum/viewforum.php?f=1

Lots Of Proxies from 1 Server using 3Proxy

May 13th, 2008

My goal was to get 8k IP’s setup on a single server I’d never done this before but someone mentioned you could so I figured it was possible.

As mentioned in the title the proxy server we’re going to use is a Russian server called 3proxy. The beauty of 3proxy is it’s ultra lightweight, fast and you can run multiple IP’s in a single daemon because it has internal threads. Check out http://3proxy.ru/ which is the home of 3proxy.

We started off by getting all the IP’s pointed to the beefy dedicated server and then started playing with proxy software. We first started off with tinyproxy without much success. I had never used this before but my hosting company suggested and mentioned it would work for this setup. Unfortunately when you try to load 8k IP’s it starts a new daemon process in the OS for each IP and will eventually crash.

Next we moved to my old standby I’ve been using for a few years now, 3proxy which we tried the same thing as we did with tinyproxy which was start a daemon for each individual IP. We tried this first as this is how I have all my other servers configured and thought 3proxy might have a smaller footprint. Guess what? This crashed just the same. The next config was throwing 8k IP’s in a single daemon. CRASH! After that we gave 4 daemon’s, 2k per a shot. This actually ran but excrutiatingly slow. The load times of pages was 10x’s what it was running a single c-block and single daemon which was our base test case. What was interesting was the server was very responsive with a super low load using this setup, but for some reason the proxies were very unresponsive. I don’t know much about the internal coding of 3proxy but I imagine it has something to do with how it’s designed internally. Lastly I decided I’d try running an individual daemon for each c-block all at the same time. Now, for each daemon we need to run it on a different listening port. This was the magic bullet, seems if you don’t put to many IP’s in a single daemon they run smooth. As of right now I’m running about a 8 server load which high but things are still running very smoothly and the load times are almost as fast as not using a proxy at all.

If you want to run a lot of proxies on single server I ‘d suggest 3proxy which is a nice free opensource piece of software. Then run no more then 255 IP’s per daemon. The number of daemon’s per server you’re going to be able to run is solely dependent on how good the server is.

P.S. That fellow who told me I could run them all on the the same server later said no you couldn’t after the first couple of attempts. Also mentioned he’d never done it before.

If you’re interested in running a setup like this here’s a couple things to help.

1. This first script is going to make your config files for your daemons that 3proxy needs to run. These config’s are set as open proxies right and you should put some IP whitelisting or login/password protection on them. Read more on the 3proxy website about how to do this.

<?
// this is the port we'll start incrementing from
$port = 22406;
// first class C
$beginningclassc = 122;
//last class C
$endingclassc = 224;
//this is our class C id's like this XXX.XXX.122
for($c = $beginningclassc;$c <= $endingclassc;$c++)
{
// these are our settings for our config file
$filecontents = "#!/usr/local/bin/3proxy
nserver 127.0.0.1
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
log /usr/home/3proxy.log
daemon
#auth iponly
auth none
dnspr
flush
auth none
";
// adding each of the IP's to the config file
for($i=2;$i<255;$i++)
{
$filecontents .= "external 111.222.$c.$i\n";
$filecontents .= "internal 111.222.$c.$i\n";
//
$filecontents .= "proxy -a -n -p$port\n";
}
// increments the port for the next loop
$port++;
// saves the file to a dir of your choosing with a filename
// that has the C segment in it for identification
file_put_contents("c:/files/proxy-$c.cfg",$filecontents);
}
?>


2. This second script is a bash script that runs on your server that will start each of the daemons. Instead of running
>3proxy proxy-112.cfg
all you have to do is run this script on your server and it’ll start them all for you.

#!/bin/bash
COUNTER=122
while [ $COUNTER -lt 224 ]; do
3proxy /root/3proxy/proxy-$COUNTER.cfg
let COUNTER=COUNTER+1
done

If you don’t know how to use this make a file on your server called “proxy-start”. Then chmod it 777 by the command chmod 777 proxy-start. Then just run it using ./proxy-start. That should get all your blocks up and running. If you have an issue you can just do a killall -9 3proxy which will kill all your 3proxy processes and you can start again.

Hope this helps someone :)

Curl Cookies – Quick Tip

April 19th, 2008

I know I haven’t got around to writing script that uses cookies to login. However if you’re on that path and are interested in using cookies to do things like login and stay logged into a site there’s one troubling thing I had big issues with when I started.

To use a cookie we need to set it’s location and this is where I’ve had troubles. For some reason I’ve had problems using a cookie not set with the full path. So when you set your cookie location make sure you use the full path of your cookie location.

$cookie = “/home/user/tmp/cookie.txt”;
If you’re going to use multiple threads or want to code up a captcha solve you have to save the session so you probably want to do a
$cookie = “/home/user/tmp/cookie-”.rand(111,9999).”.txt”;

And that’s the quick tip. I beat my head against the wall with this one a bunch of times and the full path seemed to be the thing that solved the curl cookie issues I had. If you’re having problems with cookies give this a try.

Just quickly to use cookies you just use a couple of simple lines.

So the initial call you need to set a cookie like this

curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); // sets the cookie file location
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); // this says to start a new cookie file.

And that’s it to set the cookie on login or whatever you might need to start a cookie for. Then all your calls after that would look like this.

curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); // sets the cookie file location
curl_setopt($ch, CURLOPT_COOKIE, $cookie); // use the cookie we have on file

And there you have it cookies are just that easy. I’ll get some example code up in the next day or so to show them in the wild.

Google enters Online Processing, Storage and Serving Space

April 7th, 2008

If you haven’t heard already Amazon has been doing this for a bit. Basically rather then buying a new server you can use a nice web based service to do things for you. Add all your stuff to their servers to run and it will act as a virtual server for you. Google is offering decent amount of bandwidth, storage and processing under their free plan. Read more about it here:

Google AppEngine


This is only in beta right now and only open to the first 10k people that signed up at 9pm PST. I tried at 10:30pm and it made it sound like I missed the boat and was added to a waiting list. But mind as well get on that list now if you’re interested.

PHP Platform I Write Code In

April 3rd, 2008

As I’m sure you know PHP as with most languages you can code right in a text editor on your home computer. However this might not be the most effective use of your time. I get asked a lot, what I use to code in. Well after trying quite a few things the ZEND IDE is about the best thing I’ve found out there. Now I know there’s some of you that are going to whine that it’s a little overhead intensive and yes you’re right. Zend is by no means notepad. However it brings a lot of tools to the table that make it well worth that over head in my opinion.

  1. Built in sFTP, FTP drive mapping
  2. Stepped debugging
  3. Robust code completion library
  4. Version control and management

Now if you’re going to use Zend I invite you to go to tools/preferences first thing and uncheck “Use OS look and feel”. What this does is it makes Zend try and emulate what the rest of your computer looks like. For example if you’re running XP like me it gives it the XP look and feel. Honestly I hear a lot that Zend is super slow and people just can’t put up with it. Well this is what makes it slow, turn this off and the performance will improve 10 fold.

1. sFTP/FTP Drive Mapping
What got me started on writing this post is I was at nickycakes blog today and he was talking about drive mapping. I’m sure if you’re just starting or when you started with all this PHP and servers stuff one of the biggest pain in the butt’s was figuring out how this all worked. When I first started I used to run a copy of WAMP on my local machine and code everything locally. Then when I finished it and got it working I migrated it to the server. If you’ve ever done this you know the headache this can be. Windows has a totally different file structure. Permissions can be a pain in the ass and so on. Also once you have it on the server it’s going to require some debugging ( funny how software writing works that way ). So when I first started I’d download the file, edit it, upload it and test. As you can see doing this 100 times can be an arduous task.

Zend to the rescue. With zend you have a file manager in your left pane by default. In this pane all you have to do is left click then hit “add FTP server”. A window will pop up that will ask you the details of you FTP or sFTP connection. Then once you hit ok it’ll connect to the server and map a drive into Zend just like another hard drive on your local box. You can open, edit, close files all in real time which totally eliminates the upload/download task. This also allows you to build in real time on the server where the scripts are going to reside in the end. One thing to take note of. If you’re used to coding locally and uploading you always have a sort of backup of a working version online. Now that you’re controlling things in real-time you can easily write over something that works with something that doesn’t. Remember when you hit save the old file is gone.

2. Stepped Debugging
When I first shifted to PHP I came from a small background in Visual Basic and developing in Visual Studio. Well visual studio has very very robust debugging tools. For example if ( this is for php only coders ) you could hit run and it would go through your script step by step. Then as it’s going through you could mouse over each variable, object, array or whatever to see what was contained in it on that line. You can then make some tweaks and run that same line again and see if it fixed it. Something like this might be useful right? Well Zend has debugging built into it. And you can set it up so that it works direct on your server.

3. Robust Code Completion Library
This was HUGE when I was new and didn’t know many of the functions at all. Code completion allows you to start writing a function and it will bring up a list of functions to finish it. For example let say you’re looking for a string function to do something. Well you know that most of the string functions start with a “str” so you start typing that and it pops up the whole list of functions that start with “str” then you page down the list and find the one you’re looking for. When you type the complete function it shows you 1. a description of what the function does, 2. what the function takes as inputs and 3. what the functions generates as an output. This can be extremely helpful and save you a lot of time from going to php.net. Zend also has a powerful real-time syntactic code check. Just like when you’re working on a word document and it underlines grammar mistakes in real-time so does Zend with your syntax. It’s very useful to see if you missed a bracket here or there which you might spend a good amount of time debugging.

4. Version control management
If you’re working with a team on a single project and sharing files this can be really useful. Also is very helpful if you want to make backups along the way in an easy fashion. Zend supports both CVS and SVN. I’m not going to get into a lot chat about versioning. But just know it supports all the features of versioning natively.

5. I’m sure there’s other things I’m not thinking of right now.
If you’re reading this and use the Zend IDE feel free to add them in the comments.

That’s just a few reason to give Zend a shot. I can guarantee you with the tools it provides it will help you learn faster and speed your coding up. Don’t be lame and try it for a day or two. Really give it a shot as it’s a complex program that takes some getting used to. But will save you time and improve your coding once you d.

Pinging tool to let the world know your blog/site has been updated.

March 13th, 2008

Are you familiar with what pinging an aggregator is? If you’re looking for a way to let the world know that your blog or website has been updated there’s something you can do which is called pinging an aggregator ( I’m sure there’s some technical term for it but I don’t know or care what it is. ) which is a website that collects the latest updates on site by notification. Some examples of these places are weblogs.com, technorati, feed burner, etc. Back in the day (sounding like an old man) you could ping these places and the spiders would come running and index you instantly, this was back in 2006. They’re not nearly as effective now but definately still bring the spiders. I’ve been asked numerous times if I would post a script to post to these engines and honestly the easiest way to do it is go through something like pingomatic.com. Which submits the pings to all the engines for you. I may later make a script that uses the xml post to a list of aggregators seperately. But for now to keep it easy lets get started with a simple pinger for pingomatic. This is an EXTREMELY simple script that if you know how to use curl you could do very easily. However sometimes the hard part is finding out what to post where. Therefore I’m going to touch on using LiveHTTPHeaders to pull the string out.

If you don’t have LiveHTTPHeaders please go to http://livehttpheaders.mozdev.org/ and install it now. I’m also going to assume you’re using FireFox as any self respecting dev should be. The first thing once you have LHH installed is go to “Tools” in firefox and then down to “Live Http Headers” and open the headers window. Next go to http://www.pingomatic.com in firefox. You’ll probably see a bunch of stuff fly by on the window as that’s the headers being passed and received to get to that page. Now you’ll want to hit clear and clean that out so the box is blank for LHH. Next fill in your values on the form on pingomatic.com, once you’re done hit “send pings”. Again you’ll see some info in the headers box that looks like this.

http://pingomatic.com/ping/?title=Oooff.com&blogurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2F&rssurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2Ffeed&chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on

GET /ping/?title=Oooff.com&blogurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2F&rssurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2Ffeed&chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on HTTP/1.1
Host: pingomatic.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://pingomatic.com/
Cookie: blogurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2F; title=Oooff.com; pinged=a%3A13%3A%7Bi%3A0%3Bs%3A14%3A%22chk_weblogscom%22%3Bi%3A1%3Bs%3A9%3A%22chk_blogs%22%3Bi%3A2%3Bs%3A14%3A%22chk_technorati%22%3Bi%3A3%3Bs%3A11%3A%22chk_myyahoo%22%3Bi%3A4%3Bs%3A13%3A%22chk_pubsubcom%22%3Bi%3A5%3Bs%3A14%3A%22chk_blogstreet%22%3Bi%3A6%3Bs%3A14%3A%22chk_feedburner%22%3Bi%3A7%3Bs%3A11%3A%22chk_syndic8%22%3Bi%3A8%3Bs%3A13%3A%22chk_newsgator%22%3Bi%3A9%3Bs%3A14%3A%22chk_blogdigger%22%3Bi%3A10%3Bs%3A12%3A%22chk_moreover%22%3Bi%3A11%3Bs%3A14%3A%22chk_weblogalot%22%3Bi%3A12%3Bs%3A13%3A%22chk_icerocket%22%3B%7D

HTTP/1.x 200 OK
X-Powered-By: PHP/4.4.7
Set-Cookie: blogurl=http%3A%2F%2Foooff.com%2Fphp-affiliate-seo-blog%2F; expires=Mon, 07 Jul 2008 14:41:14 GMT; path=/; domain=.pingomatic.com
Set-Cookie: title=Oooff.com; expires=Mon, 07 Jul 2008 14:41:14 GMT; path=/; domain=.pingomatic.com
Set-Cookie: pinged=a%3A13%3A%7Bi%3A0%3Bs%3A14%3A%22chk_weblogscom%22%3Bi%3A1%3Bs%3A9%3A%22chk_blogs%22%3Bi%3A2%3Bs%3A14%3A%22chk_technorati%22%3Bi%3A3%3Bs%3A11%3A%22chk_myyahoo%22%3Bi%3A4%3Bs%3A13%3A%22chk_pubsubcom%22%3Bi%3A5%3Bs%3A14%3A%22chk_blogstreet%22%3Bi%3A6%3Bs%3A14%3A%22chk_feedburner%22%3Bi%3A7%3Bs%3A11%3A%22chk_syndic8%22%3Bi%3A8%3Bs%3A13%3A%22chk_newsgator%22%3Bi%3A9%3Bs%3A14%3A%22chk_blogdigger%22%3Bi%3A10%3Bs%3A12%3A%22chk_moreover%22%3Bi%3A11%3Bs%3A14%3A%22chk_weblogalot%22%3Bi%3A12%3Bs%3A13%3A%22chk_icerocket%22%3B%7D; expires=Mon, 07 Jul 2008 14:41:14 GMT; path=/; domain=.pingomatic.com
Content-Type: text/html
Content-Length: 2484
Date: Thu, 13 Mar 2008 20:54:40 GMT
Server: LiteSpeed
Connection: close
I’m not going to get into detail on what all that means because in this case we only care about one thing and that’s the very top line. They are using a GET string vs. a post as you can see all the data is be appended to the url. If you don’t know there are two ways to pass data in HTML that’s a GET or POST. GET is going to put all the data in the url. For example look at googles string when you do a search, that’s using GET style data passing. A POST pass is a little more complicated so we’ll save that for the next tutorial. There would be an additional line in the headers that would say post:. With a post we need to add a few more lines to the curl call but we’re not going to do that in this tutorial. Now that we have our url with the data in it lets talk about hwo we’re going to make that into a script to post to the ping.

What I decided to do to make it easier to read is break the string up as you can see we’re using the .= which just keeps appending the string. So you could do this in a single string inline but this is much easier to read. From here I’m going to go to commenting the code for each line.

<?php

// Here is where we're breaking up the url as mentioned above, you can easily see which engines we're pinging now as opposed to trying to find them in the long url
// this is the base url so we're starting our url with that
$url = "http://pingomatic.com/ping/?";
// you'll notice we're using a urlencode function here that makes the text you print url friendly and replaces the chars like spaces with their appropriate url friendly value.
$url .= "title=".urlencode("PHP Posting and Screen Scraping Tutorials");
$url .= "&blogurl=".urlencode("http://oooff.com/php-affiliate-seo-blog/");
$url .= "&rssurl=".("http://oooff.com/php-affiliate-seo-blog/feed");
//as far as I'm concerned leave all the ping places on, the more the better
$url .= "&chk_weblogscom=on";
$url .= "&chk_blogs=on";
$url .= "&chk_technorati=on";
$url .= "&chk_feedburner=on";
$url .= "&chk_syndic8=on";
$url .= "&chk_newsgator=on";
$url .= "&chk_myyahoo=on";
$url .= "&chk_pubsubcom=on";
$url .= "&chk_blogdigger=on";
$url .= "&chk_blogstreet=on";
$url .= "&chk_moreover=on";
$url .= "&chk_weblogalot=on";
$url .= "&chk_icerocket=on";
$url .= "&chk_newsisfree=on";
$url .= "&chk_topicexchange=on";

// now that we have our url composed our url we’re going to call it using curl
// initializes the curl object and sets the url we’re going to get
$ch = curl_init($url);
// tells curl it to follow any redirects
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// returns the page fetched to a variable in this case $page
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// executes the curl object as we have things set
$page = curl_exec($ch);
// cleans up the curl object nicely
curl_close($ch);
//prints the page got to the screen to make sure it worked right.
echo $page;

?>

A challenge for you, take this script and make it load the data from a csv file which is in the format

title,url,feed
title,url,feed
Here’s a hint there’s another tutorial on this site you can copy that from.

Hope this helps some of you building a simple ping system for your sites and blogs. I might show you a tutorial on how to ping each individually but we’ll see how I feel. Now we wouldn’t want to over ping and abuse this now would we ;)

Enjoy!
Smaxor