Results 1 to 8 of 8
-
23rd May 2012, 08:48 AM #1OPMember
Adfocus doesn't return anything in cURL
i am not getting any output from adfocus link using curl
Code:<?php $ch = curl_init ("http://adfoc.us/426491"); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_REFERER, "http://adfoc.us/*********1"); $page = curl_exec ($ch); echo $page; ?>
torrfriend Reviewed by torrfriend on . Adfocus doesn't return anything in cURL i am not getting any output from adfocus link using curl :'( <?php $ch = curl_init ("http://adfoc.us/426491"); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_REFERER, "http://adfoc.us/*********1"); $page = curl_exec ($ch); echo $page; ?> Rating: 5Skipp the Adfly Adfocus LinksBucks by one click(No Ads, No pop up's)
For << Kimsufi >> Truly Unmetered - No more 5Tb or 10Tb Limit
Wordpress Theme not working after editing footer copyright
-
23rd May 2012, 09:46 AM #2Respected MemberWebsite's:
DL4Everything.com Soft2050.inThe reason why it doesn't work is because they require useragent and accept property in the header to be sent, maybe to prevent from bots.
Adding useragent and accept property works:
PHP Code:<?php
$ch = curl_init ("http://adfoc.us/426491");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_REFERER, "http://adfoc.us/*********1");
curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0');
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'));
$page = curl_exec ($ch);
echo $page;
?>
PHP Code:<?php
$ch = curl_init ("http://adfoc.us/426491");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_REFERER, "http://adfoc.us/*********1");
curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0');
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'));
$page = curl_exec ($ch);
echo '<textarea style="width:100%; height: 100%;">' . $page . '</textarea>';
?>
-
23rd May 2012, 10:19 AM #3MemberWebsite's:
google.comadfocus is undergoin still some changes and bugs
i contact their support and they said it will be fixed soonMy Avatar is 100% Me.
-
23rd May 2012, 11:59 AM #4MemberWebsite's:
YourVPNList.blinkweb.comby the way is is good profit from this site?
-
23rd May 2012, 03:06 PM #5MemberWebsite's:
google.comi don't say adfocus is best nowdays not even adfly !
i have jumped from them and using a new and stable one
and paying on time every week without failMy Avatar is 100% Me.
-
23rd May 2012, 03:14 PM #6OPMember
Thanks soft
so we need to analyse the header in source code too, i thought they check for referrer only
Offtopic:
(i saw the header using live http headers)
so mate we need to add the things in " Accept: xxxxxxxxx " as HTTPHEADER?
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'));
is it applicable for all sites mate....??
Skipp the Adfly Adfocus LinksBucks by one click(No Ads, No pop up's)
For << Kimsufi >> Truly Unmetered - No more 5Tb or 10Tb Limit
Wordpress Theme not working after editing footer copyright
-
23rd May 2012, 03:24 PM #7Respected MemberWebsite's:
DL4Everything.com Soft2050.inAccept Header tells what type of response the browser is looking for.
So for this: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Expanded, asks for any of the following formats:
- (X)HTML format (HTML First)
- XML format
- Finally */* means for any type of format.
So it should be applicable for all sites
-
23rd May 2012, 03:33 PM #8OPMember
once again thanks buddy, now i understood
----
Hi spartan, there is a lot of ways to monatizing sites, but these adfly/adfocus/linkbucks are worst than popup, just my opinion
Note:
now i am learning php, daily 30 minutes - 1 hour, sometime 2 hour in holidaySkipp the Adfly Adfocus LinksBucks by one click(No Ads, No pop up's)
For << Kimsufi >> Truly Unmetered - No more 5Tb or 10Tb Limit
Wordpress Theme not working after editing footer copyright
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
SHOUTcastUK Return
By UKInternetGroup in forum Hosting DiscussionReplies: 6Last Post: 11th May 2012, 12:17 PM -
Need mods, Giving some thing in return.
By Doublecrosser in forum Community CooperativeReplies: 8Last Post: 5th Oct 2010, 07:41 AM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...