Results 1 to 10 of 11
Threaded View
-
5th Nov 2010, 09:38 AM #3You can call me G
Here's the code (with a function)
:
PHP Code:function postHost($url, $data, $cookie, $credentials){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
if($cookie != "")
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
if($data != ""){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
if($credentials != ""){
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $credentials);
}
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
$page = curl_exec($ch);
curl_close($ch);
return $page;
}
$img = postHost("http://www.lulzimg.com/upload.php?submit=lulz&url=$url", "", "", "");
preg_match_all("/http:\/\/lulzimg.com\/[a-z0-9]+\/[a-z0-9A-Z.\-\[\]]+/", $img, $matches);
$link = $matches[0][1];
echo "Your link sir: $link";
My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Hiring] PHP Programmer to create script
By ChaoscripT in forum ServicesReplies: 0Last Post: 12th Apr 2012, 08:49 PM -
Anyone can create script like this?
By MediaStar in forum Web Application/Script SupportReplies: 12Last Post: 25th Feb 2012, 12:03 PM -
[Hiring] Looking for any one who can create script as like Adf.ly
By Pettrious in forum Completed TransactionsReplies: 10Last Post: 21st Feb 2012, 09:00 PM -
[Hiring] Coder to create custom script
By cyb3r in forum Completed TransactionsReplies: 1Last Post: 15th Sep 2011, 11:01 PM -
[Hiring] I am looking a programmer to create a script
By bestvideorap in forum Completed TransactionsReplies: 3Last Post: 22nd Aug 2011, 03:57 PM
themaCreator - create posts from...
Version 3.55 released. Open older version (or...