2010年03月24日 過去Blog
<?php $params = array( “login-name” => ‘nakamuraya’, “login-password” => ‘gerogero’, “submit” => “ログイン” ); $fp = fopen(“tmp”, “w”); $ch = curl_init(“http://www.phppro.jp/members/login.php”); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, “cookie”); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_WRITEHEADER, $fp); $ output = curl_exec($ch); fclose($fp); curl_close($ch); print “CURL OUTPUT:n{$output}n”; $ch = curl_init(“http://www.phppro.jp/members/history.php”); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, “cookie”); curl_setopt($ch, CURLOPT_COOKIEFILE, “tmp”); curl_setopt($ch, CURLOPT_POST, TRUE); $output = curl_exec($ch); print_r(curl_getinfo($ch)); curl_close($ch); print “CURL OUTPUT:n{$output}n”; ?> 参照元 : http://itpro.nikkeibp.co.jp/article/COLUMN/20070704/276685/

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

iPhone UILabel 高さをテキストの量で決める

2011年04月30日 過去Blog
http://www.hirano-dept.com/blog/2011/01/iphone-uilabel.html NSString *str = @"sample string"; CGSize size = [str sizeWithFont:[UIFont boldSystemFontOfSize:13] constrainedToSize:CGSizeMake(5…
「iPhone UILabel 高さをテキストの量で決める」をはてなブックマークに追加

linux sambaでwindowsとファイル共有

2010年09月28日 過去Blog
linux側の設定の参考サイト http://www.linuxmania.jp/samba_setting.html 日本語が文字化けする場合 [global]以下に次の3行を追加する # vi /etc/samba/smb.conf [global] dos charset = CP932 unix charset = UTF8 display charset = UTF8…
「linux sambaでwindowsとファイル共有」をはてなブックマークに追加

Xcode上で静的解析

2011年04月27日 過去Blog
http://www.j-love.info/natsu/iphone-app/natsus_note/dev/tips/iphonexcodebuild_and_analyze.html
「Xcode上で静的解析」をはてなブックマークに追加

[10] UITabBar での view の切り替え

2010年12月20日 過去Blog
今回は、UITabBar と UITabBarItem の使い方についてです。 UITabBar を使い、UITabBarItems や view を追加する方法です。 1. UITabBar テンプレート を使ってプロジェクトを作成 まず、タイトルの通りに XCode の UITabBar テンプレートを使って、プロジェクトを作成します。 …
「[10] UITabBar での view の切り替え」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy