Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help with curl_setopt PHP
Old 05-16-2010, 07:10 AM Help with curl_setopt PHP
ZoC
Skilled Talker

Posts: 68
Trades: 0
hello there, i make this command but i try to add this on my command and is not working anymore ...

PHP Code:
 $live_m get_match('/<li>(.*)Live<\/a><\/li>/',$html);
 
$html str_replace('<li>' $live_m 'Live</a></li>'''$html); 
the full command is

PHP Code:
<?php

 $url 
'http://www.website.com';

 
$ch curl_init();
 
curl_setopt($chCURLOPT_USERAGENT'Firefox (WindowsXP) - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6');
 
curl_setopt($chCURLOPT_URL,$url);
 
curl_setopt($chCURLOPT_FAILONERRORtrue);
 
curl_setopt($chCURLOPT_AUTOREFERERtrue);
 
curl_setopt($chCURLOPT_RETURNTRANSFER,true);
 
curl_setopt($chCURLOPT_TIMEOUT30);
 
$htmlcurl_exec($ch);
 if (!
$html) {
  echo 
"<br />cURL error number:" .curl_errno($ch);
  echo 
"<br />cURL error:" curl_error($ch);
  exit;
 }

 
$live_m get_match('/<li>(.*)Live<\/a><\/li>/',$html);
 
$html str_replace('<li>' $live_m 'Live</a></li>'''$html);
 echo 
$html;

?>
hope someone can tell me what i mistake, thanks
ZoC is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-16-2010, 11:55 AM Re: Help with curl_setopt PHP
ZoC
Skilled Talker

Posts: 68
Trades: 0
i fix aready thanks anyway ...
ZoC is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with curl_setopt PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48794 seconds with 12 queries