I need a way to treat the result of a curl session as a stri

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
McMillian
Forum Newbie
Posts: 3
Joined: Tue Jul 22, 2008 1:52 am

I need a way to treat the result of a curl session as a stri

Post by McMillian »

ng?? I guess that's what I'm trying to do

I have a curl script that when it runs, runs a page from megaupload via my premium account cookie

I want to pick through the source code with preg_matches to pull out what I need, and I have the code all figured out but I don't know how to search the returned page

I can't file_get_contents to my own server for some reason...so I don't know what to do.
User avatar
dhrosti
Forum Commoner
Posts: 90
Joined: Wed Jan 10, 2007 5:01 am
Location: Leeds, UK

Re: I need a way to treat the result of a curl session as a stri

Post by dhrosti »

there's a option to return the source code that you can set using...

Code: Select all

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
$source = curl_exec();
...i think?
Post Reply