Jump to content

gargoylemusic

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gargoylemusic's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When you include that file, try using include_once() instead of just include()
  2. Yeah, this seems like a perfect use of Apache's ModRewrite functionality (that is, control this on a server-level instead of PHP-level)
  3. The manual might shed light (http://us3.php.net/features.http-auth): Do you have safe mode enabled? At any rate, it seems like REMOTE_USER will work regardless.
  4. try looking at addslashes() and stripslashes() (http://us3.php.net/addslashes). That might help escape the quotation marks so they're more palatable with your SQL queries (not to mention prevent sql-injection...)
  5. At first glance, I don't exactly know what it is. But try this: echo '<pre>'; print_r($_SERVER); echo '</pre>'; That will give you an array dump of all of the $_SERVER variables. You can see what's being passed, and if the PHP_AUTH_USER isn't... then we can explore other things.
  6. cURL is what I use to write all of my bots. There are plenty of cURL tutorials and examples out there (it might be easier to use the command-line version first just to get a feel for it.) What you have to be careful about is negotiating SSL, header information, posted form fields, and cookies. A cURL/http library might be able to help you handle all of this stuff - I myself haven't had a ton of success with them. But this firefox extension will help you track what you have to pass back and forth to the server, I think - it displays all of the headers. http://livehttpheaders.mozdev.org/
  7. When I do that, the only thing unique about the record would be the auto-incremented ID; does that mean I don't have to wrap it in a transaction? (If two people create accounts at the same time... MySQL won't assign the same auto-id?) (pardon my ignorance... if you have any decent tutorials on this kind of thing, please point me to the url)
  8. [quote author=fenway link=topic=100678.msg397727#msg397727 date=1152978386] UID fields should always be auto-increment.. MAX() is unreliable, because you don't have consistent reads in MySQL with MyISAM table without transactions, so you can't be sure that you're adding one to the "last" record.  Auto-incrementing is always appropriate for uids; sometime count=count+1 makes sense for other fields, but the same warning applies. [/quote] Then should I use an InnoDB table (and then use transactions?) I mean... is there any advantage to that (why does't everybody use auto_increment?)
  9. My question is fairly simple. There seem to be two ways of incrementing the 'ID' field of a new record. One is to find the maximum ID, add one, and use that new value as the ID. Or one can use an auto-incrementing field. Why would someone use one method versus another? When is auto-incrementing not appropriate?
  10. Ah, I have figured out what the problem was. I was using (on a school linux server) curl version 7.10.6... buggy, from 3 years ago. (My apologies...)
  11. I'm having a little bit of trouble using curl (libcurl) for http digest authentication. I can paste the PHP libcurl equivalent if you would like, but right now I'm simply trying to get curl doing what I want it to. Basically, I want to get livejournal's protected RSS feeds. For example, I'd like to get: [a href=\"http://gargoylemusic.livejournal.com/data/rss?auth=digest\" target=\"_blank\"]http://gargoylemusic.livejournal.com/data/rss?auth=digest[/a] In the web browser, I'm prompted for a username and passwd. I tried using curl (via the command line, at first) as follows: [code]curl --digest -u username:passwd "http://gargoylemusic.livejournal.com/data/rss?auth=digest"[/code] I'm given an authentication failure. Do I have to do something else to send all of the proper credentials to LJ? What exactly am I missing? (Again, if it would be easier for me to rewrite this as a PHP script, I can... right now I'm just trying to get it to 'work') Am I simply not understanding something about http digest - am I not passing all of the information I need for curl to authenticate me? Any help would be appreciated.
×
×
  • 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.