Jump to content

dpacmittal

Members
  • Posts

    220
  • Joined

  • Last visited

    Never

Everything posted by dpacmittal

  1. I didn't know this is the third you are using. And yes, its a pain in the arse to convert such a huge forum and not everything is converted nicely since all the forums have different database structure.
  2. Why not convert this forum to vBulletin since its the best out there? P.S. : This forum has been as inspiration to me. Whenever I think of getting a vBulletin license, I think of PHPFreaks and push the thoughts out of my mind. SMF has too many flaws, according to my experience with them.
  3. I just made a technology forum around 2-3 months ago. Link in my signature. Let me know your opinions about it.
  4. I'll take your word on that one. Write me a ZF action controller plugin and I'll put it in our SVN repository. Requirements: - No using any SMF APIs. They suck. - If logged out on the main site: Must detect if there is an active SMF session and create a local corresponding session. - If logged in on the main site: Create an SMF session. Just create a script which will use CURL to login the same user to SMF when he logging into the main site. Same for logoff. That would work, wouldn't it?
  5. With unified login, they wouldn't have been separate systems. They would've been unified. It isn't that difficult too, imo.
  6. What if I put incomplete headers in CURL? Would it auto-complete the headers. For eg: $header_array[0] = "POST /dynamic/login.php HTTP/1.1"; $header_array[1]= 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 GTB5'; $header_array[2]= "Host: www.mediafire.com"; $header_array[3]= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; $header_array[4]= "Accept-Language: en"; $header_array[5]= "Accept-Encoding: gzip,deflate"; $header_array[6]= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header_array[7]= "Keep-Alive: 300"; $header_array[8] = "Connection: keep-alive"; $header_array[9]= "Cookie: ukey=$ukey;"; $header_array[10]= "Referer: http://www.mediafire.com/"; $header_array[11]= "Content-Type: application/x-www-form-urlencoded"; $url="http://www.example.com/login.php"; $params="login_email=".urlencode("xxxxxxxxxxxx@gmail.com")."&login_pass=".urlencode("xxxxxxxxxxx")."&login_remember=on&submit_login=".urlencode("Login to MediaFire"); //$params=urlencode($params); echo $params; $ch= curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HTTPHEADER,$header_array); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,TRUE); curl_setopt($ch, CURLOPT_HEADER,1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); $abc=curl_exec($ch); Here I haven't set the content-length .. would it set by itself?
  7. The PHPFreaks home-page which contains the tutorials with features like rating, comments etc. is so cool. I own an SMF forum too. I want to know if its custom made portal or is it a mod which is available for SMF Thanks
  8. I am trying to use curl to download files whose links are generated dynamically. The file link is as follows: www.example.com/download/$fileid .. this redirects us to real download link which is dynamically generated. How do I use curl to download the file? CURL is not necessary... i may also use wget if its easy that way.
  9. I want to add a proxy support to my PHP script. How is it possible?
  10. I read in a tutorial somewhere (actually, 2-3 different tutorials) that its a bad practice to directly access data members (variables inside class) of a class. But they never explained why its a bad practice. Can anyone explain me why its a bad practice?
  11. Thanks.. will try it. Can't we do like just remove all tags except few. I know some regex but not so complex. I know we can add ^ which means "NOT". Can't we do something like that?
  12. I have retrieved html contents using CURL. I successfully retrieved all the contents between the needed form tags. It has some table tags (<tr><td><th>) and many other tags. I just want to retrieve all <input> tags, <select> tags, and <textarea> tags. Whats the regex I should use to clear all unneeded tags?
  13. Got it working. Just removed all semi-colons using preg_replace
  14. I hope I sounded clear. Here's more clear explanation: I've got few semi colons in my POST data. When I post that data using CURL, only the data before first semi-colon gets submitted, the rest is ignored;
  15. I have this perl/CGI script which converts HTML to BB code. It works fine, I've checked it. Now when I use curl to submit the form using POST data to that script, the POST data breaks. I mean, it breaks at <p style="padding:5px. The data before that is submitted perfectly. Its obvious that there's a semi-colon after padding:5x which is breaking the POST data. How can I resolve this issue?
  16. If the site address is http://www.mysite.com/index.php ... what code do I have to put inside index.php for getting http://www.mysite.com/index.php as a variable inside the script. PHP_SELF shows different behaviour on different versions of PHP. I need to make a PHP code for displaying ads in which I have to forward the web address, to a remote server which would fetch the ad link. Also, is cURL the only method to call another remote script?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.