CURL PHP Book Chapters (Table of Contents):

1.0  Welcome to PHP/CURL Book ………………………………….……… 05

 

1.1  About this Book………………………………………………… 06

1.2  About the Author………………………………………………… 07

 

2.0  Getting Started with CURL PHP Book …………..…………………… 08

 

2.1 Before You Start……………………………………….………… 08

2.2 Technical Requirements………………………………………… 08

2.3 Installation………………………………………………………… 08

 

3.0  Curl Library …………………………………………..…………………… 10

 

3.1 What is cURL ?………………………….………… 10

3.2 What is libcurl ?………………………….………… 11

3.3 What is PHP/CURL ?………………………….…12

3.4 Who write PHP/CURL functions?…………….…12

3.5 The HTTP Protocol ………..…………………… 12

3.6 To cURL or to libcurl?………...………………… 12

 

4.0 PHP/CURL Functions with Examples …………………………………… 13

 

4.1. Using libcurl with PHP…………………………………………… 13

4.2. Simple usage……………………………………………………… 13

4.3. Forms …………………………………….……………….…………15

1.1 GET ……………………………………..………….……………… 15

1.2 POST ……………………………………………………………… 16

1.3 Hidden Fields …………………………………………..………… 17

1.4 Figure Out What A POST Looks Like ….……………………… 18

4.4. Download Image (Binnary File) ……………………..…………… 18

4.5 Authentication ……………………………………………………… 19

4.6. Referer ……………………………………………………………… 19

4.7. User Agent …………………………………………….…………… 20

4.8. Redirects …………………………………………………………… 21

4.9. Cookies ………………………………………………..…………… 22

4.10. HTTPS (SSL) ……………………………………………………… 25

4.11. Debug ………………………………………………..…………… 26

4.12. XML, Credit Card Processing Solutions………………………...28

4.13. Post Custom Header to the Remote (Target) Server ………...30

4.14. Upload a file to remote server from HTML form       ……..…...32

4.15. FTP Upload a file       …………………………………………...32

4.16. FTp Delete a File       ………………………………………..…...33

 

 

 

 

 

 

 

5.0 LibCURL Options ………………………………………..……………… 35

 

6.0 Header Tracking Tools ……………………………….………………… 42

 

7.0 RealTime Example ……………………………………….…………… 44

7.1. Ebay CURL PHP Login Script …………………..…………………… 44

7.2. Ebay Summary Page After Login with PHP…..………….………… 48

7.3 Calculate Fedex Shipping Charges with XML CURL PHP support. 51

7.4 Yahoo Email login and download Address Book . ………… 55

7.5 PayPal Login and download Transaction History. ………… 55

7.6 Hotmail Login and download Contacts List. ………… 55

7.7 Gmail address book download . ………… 55

 

8.0 Regular Expressions ……………………………………….…………… 56

8.1. What are Regular Expressions? ………………..…………………… 56

8.2. What exactly is possible with Regular Expressions?…….………… 56

8.3 Regular Expressions in PHP…………………………………………… 56

8.4 Regular Expressions Examples ……………………………. ………… 59

8.4.1 preg_match function …………...   ………………………. ………… 59

8.4.2 preg_match_all function …………………………………..………… 60

8.4.3 preg_replace function …………………………………..………… 62

8.4.4 preg_replace function …………………………………..………… 62

8.4.5 'ereg','eregi','ereg_replace'……………………………..………… 63

8.4.6 Parsing Form for hidden fields …………………………..………… 64

8.4.7 Parsing Images linkes from HTML page.………………..………… 65

 

 

Appendix A …………………………………………………………………… 67

 

Appendix B …………………………………………………………………… 70

 

References …………………………………………………………………… 71



 
Copyright 2005-2017 © CURL.phpTrack.com All rights reserved.