Current location: Hot Scripts Forums » Programming Languages » PHP » how do I put an if statement... ?


how do I put an if statement... ?

Reply
  #1 (permalink)  
Old 04-17-05, 07:42 PM
klaniak klaniak is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Underground
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
how do I put an if statement... ?

let's say I use this script

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https

$result=curl_exec ($ch);
curl_close ($ch);

echo("Results: <br>".$result);

how do I check the values if they exist in:
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
in the given url:
curl_setopt($ch, CURLOPT_URL,$url);
if they don't exist try this $params and so on...

does somebody know how...
this is only for knowledge
i will try to figure it out if nobody will help
Reply With Quote
  #2 (permalink)  
Old 04-19-05, 08:30 AM
enchen's Avatar
enchen enchen is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

Think the easiest way would be to look at some of the examples here:

http://www.php.net/curl_setopt
Reply With Quote
  #3 (permalink)  
Old 04-19-05, 03:20 PM
klaniak klaniak is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Underground
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

thanx but that didn't helped me need some more info (note: that I allready searched there)...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement that is part true.. cebuy PHP 1 10-26-04 05:40 PM
Hard query statement help ExtremeGuy PHP 1 08-10-04 04:24 PM
Malfunctioning switch statement and processing cstallins PHP 2 10-20-03 08:48 PM
If/else statement working...but not working mdhall PHP 13 10-16-03 08:47 AM
If then statement acting up! geneane ASP 1 09-30-03 04:32 PM


All times are GMT -5. The time now is 06:39 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.