TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-30-2008, 03:36 AM   #1 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default curl - help

im using wamp in php.ini this is what i got

Code:
extension=php_curl.dll
so there is no semicologn in front of that line in php.ini

the code im testing is

Code:
<?php

$ch = curl_init('http://www.google.com'); // the target
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return the page
$result = curl_exec($ch); // executing the cURL
curl_close($ch); // Closing connection
echo $result;  

?>
when i run the page nothing shows on the screen. what am i missing here?
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Old 07-30-2008, 11:33 AM   #2 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Try echoing out any value, if that doesn't show up, then add some text above the <?php sign.

Instead of just echoing the result, check to see if it isn't false first. If it is false, have the script notify you.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 07-30-2008, 02:59 PM   #3 (permalink)
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

Like Aaron said echo out a value before the main cURL part. Also use var_dump on $result and $ch.
Ross is offline  
Reply With Quote
Old 08-02-2008, 03:52 PM   #4 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

thanks all, i found out my wamp was messed up for some reason.
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


All times are GMT. The time now is 04:46 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design