Reply to curl PHP screen scrape after login question

Your name:

Reply:


Posted by DJ Majestik on 01/14/06 16:00

I am trying to login to a particular site, login, then do a screen
scrape after the "session" is logged in with curl. The screen scrape
with curl works, and the login with curl (as a post) works, but when I
put them together using the same $ch, the screen scrape is of the html
that is not logged in. Here is a snippet of code, if anyone can give m
advice how to do this I would appreciate it. Thanks!

JJ

$email = 'email';
$pass = '*****';
$submit = "Log In";
$curlPost = 'email=' . urlencode($email) . '&pass=' . urlencode($pass)
.. '&submit=' . urlencode($submit);
curl_setopt($ch, CURLOPT_URL, 'Login.asp');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$data = curl_exec($ch);

echo $data . "<BR><BR>\n\n";



curl_setopt($ch, CURLOPT_URL, 'Page.asp');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

echo($data);

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация