Jump to content

ts2000abc

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ts2000abc's Achievements

Member

Member (2/5)

0

Reputation

  1. header() is the only line in this test file. so there is no html before (or even after) it.
  2. i noticed that if i use headers for content-type/charset i get error message. my test file is: <?php header('content-type: text/html; charset=utf-8'); ?> and result is error so do i need to edit my php.ini to make these headers work?
  3. Hello, So, I'm trying to create my first Facebook application with PHP. Basic ideas for my application: My website includes feature called “tip of the week" and i would like to create a code that automatically sends this “tip" to my facebook page as well (as status update). I tried use crontab in my webserver for sending the data, but ran into problems... PHP code that i tried is simple: $api_key = '***'; $secret = '***'; require('/facebook-platform/php/facebook.php'); $facebook = new Facebook($api_key, $secret); $user = $facebook->require_login(); $output = “my status"; $result = $facebook->api_client->users_setStatus($output); This works just fine when it's used with browser. But the require_login() part gives trouble when code is used with crontab (no login cookie/information). So is there a way to send data to my application without login, or is there some other way to create status updates? Can I send the login information with the require_login() (for example)?
  4. this is done, and code is working just fine when it is executed from browser... but when it is executed with crontab it is not working...
  5. i’m trying to use zend frameworks ”twitter plugin” over crontab. I haven’t made any actual framework application, just using plugin that comes with zend framework… I’m calling the zf twitter plugin with this code: require_once 'Zend/Service/Twitter.php'; $twitter = new Zend_Service_Twitter('_user_', '_pwd_'); $response = $twitter->status->userTimeline(); $twitterstatus = (string)$response->status[0]->text; // after this ‘$twitterstatus’ is saved to mysql – this part works just fine… I also tried to use absolute path in “require” line… and even with the absolute path php does not run this code, when it is executed by crontab (code runs just fine when executed by browser). Any ideas how should this code be called so it would work over crontab?
  6. ok... can this be done with php geoip extension? (http://php.net/manual/en/book.geoip.php) then i wouldn't need to use any third party api's
  7. Does anyone know if there is some way (open/free API for example) for transferring users IP-address to GPS coordinates? I’m trying to make map software that shows users location…
  8. How should the _addItem() function be used when tracking orders with multiple products? Now my GA code structure is: pageTracker._trackPageview(); pageTracker._addTrans(...order info...) pageTracker._addItem(...product#1...) pageTracker._addItem(...product#2...) pageTracker._addItem(...product#3...) pageTracker._trackTrans(); and structure of additem is (copy+paste from manual) pageTracker._addItem( "1709091336025", "015", "product", "category", "13.50", "1" ); The _addTrans() seems to be working fine, but _addItem() doesn’t transmit values correctly (all the products are not showing up). Any idea why product info is not showing up in GA ?
  9. I tried to display my twitter status with this code, but it doesn't display anything (no errors, nothing). require_once 'Zend/Service/Twitter.php'; $twitter = new Zend_Service_Twitter('_user_', '_pwd_'); $response = $twitter->status->userTimeline(); $twitterstatus = (string)$response->status[0]->text; echo $twitterstatus; I can get the status just fine by using the rss reader plugin (ZF library: Zend/Feed.php), but i would like to see if this twitter plugin works faster...
  10. I have a wordpress blog that is located in: domain.com/blog/ and the admin is domain.com/blog/wp-admin now my .htaccess file (located domain.com/htaccess) includes: RewriteCond %{REQUEST_FILENAME} !-d I can access the /blog ok, BUT can't access the /blog/wp-admin (wp-admin is treated as $2) . How can I exclude the folders: /blog and /blog/wp-admin, from rewrite?
  11. I have one folder that includes .zip files (mydomain.com/downloads/). I want to limit access to these files (users should register first and get the download link afterwards). Basically users should not be able to request these files straight (like typing /downloads/file.zip to their browsers) Users should be only able to access these files through one download file (mydomain.com/download.php?variable=something). So is there a way to hide/deny access to these files before registration/sign up?
  12. When I try to save russian letters to database through my own UI (normal html form that is posted to php), mysql automatically converts these letter. Example: д converts to &#1076 I would like to save these russian/cyrillic letters as ”normal” text (not as converted special characters). When I use phpmyadmin to save russian letters straight into db everything goes just fine, letters are not converted (and they can be viewed ok). So I assume that there is something wrong with the my saving process... can anybody tell me how this situation is fixed. - Which database and table setting should I use? (now i use: CHARSET=utf8 COLLATE=utf8_unicode_ci) - Should I convert the input data somehow (php: iconv() for example)? - Should I use some special database connection setting when saving? (specify charset for example)
  13. I have a thumbnail image and i want to create a mouseover effect were small box (with text ”zoom” or ”click to enlarge”) opens on top of the thumbnail image. How is this effect created with javascript?
  14. Is it possible to create ”htaccess style” redirects (one file with multiple redirects) with IIS? For example write script that loads the old and new url from csv file, and automatically creates the redirect file...
  15. hhmmm... Yep; but i was just wondering if there is some way to convert stings to format that all browsers would handle them same way... (something like wordwrap) anyway... found css fix for this. http://petesbloggerama.blogspot.com/2007/02/firefox-ie-word-wrap-word-break-tables.html
×
×
  • 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.