Jump to content


Photo

"PHP Browser" - no CURL please


  • Please log in to reply
5 replies to this topic

#1 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 21 August 2006 - 08:09 AM

I need some help... I want to make a reasonably capable "PHP browser" with cookie/POST support.
So far, I managed to do it with fsockopen(). But as you know, some hosting services will disable fsockopen or even allow_url_fopen, making life difficult.

Is there any way around? I just want a general direction, maybe a function name...
Thanks  ;)
~ D Kuang

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 21 August 2006 - 01:24 PM

What exactly do you want to browse?

#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 21 August 2006 - 04:43 PM

I want it to simulate browser behavior, so it can visit sites and also I should be able to use POST and Cookies, and send headers (for example, User-Agent, Accept...)
~ D Kuang

#4 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 21 August 2006 - 04:55 PM

do you mean a web proxy, maybe to avoid a content filter etc.?
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

#5 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 22 August 2006 - 02:21 AM

That is correct.
I plan though to use it for remote retrieving, not for proxy...
~ D Kuang

#6 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 22 August 2006 - 02:53 PM

Well then you need cURL.
I know you put "no curl please" in the title but if you really want to do this then it's definitely the best, fastest option.
Otherwise, fopen or file_get_contents.
As you said sometimes they're blocked and if you don't have cURL then there isn't really much else you can do, they're your options.
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users