NameSilo

Need a simple function - 15$ to the one who first posts it

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Status
Not open for further replies.

Jawn

Straight from SwedenEstablished Member
Impact
2
I need a simple function.


function ($url,$timeout){




return $pageHtml;
}


I need a function that returns the html source from a specific url.
This can be CURL or fsockopen, it should be able to handle redirects.
Payment will be through paypal.

FOLLOWLOCATION with Curl is broken in latest php versions both php4 and php5.
The function needs to be written in php 4.

Best Regards
Jawn
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
I'd expect this to do the trick
PHP:
function getURLContent($url, $timeout)
{
    $oldtimeout=ini_get('default_socket_timeout');
    ini_set('default_socket_timeout', $timeout);
    
    $data=file_get_contents($url);
    
    ini_set('default_socket_timeout', $oldtimeout);

    return $data;
}
 
0
•••
Thanks neroux, works just great, whats your paypal id?
 
0
•••
0
•••
Jawn said:
Thanks neroux, works just great, whats your paypal id?

you can pay him using the donate button :)
 
0
•••
Yeah file_get_contents() is pretty much all you need to do what you want.
 
0
•••
arnold123 said:
you can pay him using the donate button :)

quoted for the laugh
 
0
•••
Status
Not open for further replies.
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back