Jump to content

nitromaster

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nitromaster's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Basically I'm gonna have a swf on a page. This will get various variables via the standard flash procedure. I have no knowledge of flash. How easy would it be to create a swf to basically take all these variables, and pass them back to a php page as GET parameters? (want to use the php page to track them/etc) That's all my swf needs to do. Is this easy-ish? Is this even possible in a swf? Thanks
  2. Hi Basically I have the following scenario: User chooses picture from list. Picture info is added into the db, including url. However I can't figure out how exactly i should be storing the url for the image. What data type should i use? How to insert it/extract it (with the backlashes/etc neeeded) ? Should I store the full http://www.somesite.com/imageurl.jpg or just somesite.com/imageurl.jpg ? (as little as possible) How do i then display it? Had a quick search here...no luck finding what i'm looking for..had a look on google but ended up just finding info on the BLOB data type..which would be inserting the actual image binary data into the database i believe. Any help? Thanks Martyn
  3. Hi Basically I have apps on each of the major social networks (myspace/facebook/etc), as part of the app you can add one of the pictures from your photo albums on the site to the app. However, now I want to create/extend these apps, so after connecting your user ids on the different networks/apps, it'll show all the pictures you've added from the other sites. Currently my db is set up like so: photos table: fields: id - autoincrement number, unquie id for that image on the table. photo_id - non autoicrement, photo id, id of the photo the user has added. this isn't unquie, but as of right now is. owner - userid of the person who added the pic. profile_id - id of the profile they added the picture to, mostly their own. profile_type - type of profile, eg member/band/etc. and a similar table for each social network. (all seperate apps/seperate non connected info) Was thinking of doing it like this: New table/db for the "Whole system" thing. Some database structure like: table: photos fields: id - autoicrement social_network - the social network for which the photo comes from photo_id - photo id for that pic, related to the social network. could have more than two entries with same photo_id but different social_network. owner - userid of the owner of the pic, related to social network. profile_id - id of the profile they're adding to possibly. profile_type - type of profile they're adding to. url - url of the picture for display purposes and then having like users: fields: id - autoincrement id...probaly won't be used. facebook_id - user's facebook profile id myspace_id - user's myspace profile id facebook_auth - auth token/session key for the user's facebook profile. myspace_ auth - auth token/session key for the user's myspace profile. etc... Then, i think if i was on facebook and wanted to display all the user's added pics from all networks i could do like SELECT id, url FROM photos WHERE profile_id = currentuserid If i just wanted to show pics from one network I'd had an AND clause for that social network. Also, i need to figure out how to securely connect the various social network accounts. I presume if they were on facebook, i could generate an unique id which linked them to the myspace app..The myspace app then connected that unique id/facebook id with the myspaceid. Anyone got any thoughts on this? Would my structure above work or is there something i oversighted? Thanks
  4. Hi I'm a total newb at php....however I know how to list info from a multi-arrayed array (or whatever its called) from the facebook api. Like echo '<table>'; $columns = 4; $currCol = 1; $photos = $facebook->photos_get('', $_GET["aid"], ''); foreach($photos as $userData) { if ($currCol==1) { echo "<tr>"; } echo '<td><div style="text-align: center; padding: 10px;"> <a href="http://apps.facebook.com/myapp/add.php?fb_page_id=' . $page_id . '&aid=' . $userData['aid'] . '&owner=' . $userData['owner'] . '&pid=' . $userData['pid'] . '"> <fb:photo pid="' . $userData['pid'] . '" size="s" /> <br/> <a href="http://apps.facebook.com/myapp/add.php?fb_page_id=' . $page_id . '&aid=' . $userData['aid'] . '&owner=' . $userData['owner'] . '&pid=' . $userData['pid'] . '"> ' . $userData['caption'] . '</a></div></td>'; if ($currCol==$columns) { echo "<tr>"; $currCol=0; } $currCol++; } The returned arrays outputted above look like Array ( [0] => Array ( [pid] => 12402342 [aid] => 0 [owner] => 1 [src] => "http://bb.bebo.com/bb/medium/2005072816/1a12402342b495956441m.jpg" [src_big] => "http://bb.bebo.com/bb/large/2005072816/1a12402342b833304858l.jpg" [src_small] => "http://bb.bebo.com/bb/small/2005072816/1a12402342b733848302s.jpg" [link] => "http://www.bebo.com/PhotoAlbumBig.jsp?MemberId=1&PhotoAlbumId=0&PhotoId=12402342" [caption] => "13517565a18343b5945356l.gif" [created] => 1122569080000 ) [1] => Array ( [pid] => 5076242936 [aid] => 0 [owner] => 1 [src] => "http://i4.bebo.com/036a/15/medium/2007/06/21/14/4186319815a4748043833b623364386m.jpg" [src_big] => "http://i4.bebo.com/036a/15/large/2007/06/21/14/4186319815a4748043833b245635494l.jpg" [src_small] => "http://i4.bebo.com/036a/15/small/2007/06/21/14/4186319815a4748043833b523511584s.jpg" [link] => "http://www.bebo.com/PhotoAlbumBig.jsp?MemberId=1&PhotoAlbumId=0&PhotoId=5076242936" [caption] => "DSC00304" [created] => 1185318973000 ) ) However I'm having difficulties doing something similar with friends. As i said I'm a total newb. I can do the above where each album is in a array but cannot figure out how to list links with the friends.get method as they aren't in arrays. The returned data for friends.get is like Array ( [0] => 1 [1] => 2 ) Want to do something like a foreach with each id ending up outputting: <a href="http://apps.facebook.com/myapp/friend.php?fb_page_id=' . $page_id . '&friendid=' . $friendid . '"><br/> But no idea how to do this without each term being in an array. Any help? Thanks
  5. Hi all I have a facebook application. Basically the database part of it stores whatever photos user's have added to the app. I'm a total newb when it comes to php/mysql, can only do simple stuff. However the app has currently grown to just over 20k users, with phpmyadmin informing me there's 57,279 records added. I have no idea when this is going to be too big for me to handle (i am totally new to all this) Basically it's one table called "userphotos" 5 fields: id - bigint(20) profile_id - bigint(20) aid - bigint(20) owner - bigint(20) profile_type - varchar(20) latin1_swedish_ci None of the above null. I currently have my indexes like so Indexes: Keyname Type Cardinality Action Field profile INDEX 19094 profile_id I think this is right, because most of my queries are like (selecting from where that field = something) SELECT * FROM photos where profile_id='" . $profile_id . "' Should i worry about the increasing size of the database yet? or? (currently growing at 2-5k records a day i think) I've heard of slowdown/etc with large databases, but have no idea how long it's gonna be before i get to that stage. (I have no idea about any of this ) Thanks
  6. Okay. Eventually got it working with BigDump =)
  7. Hi Yes I have ftp support. I tried using bigdump but this kept throwing "delimiter" errors. How would I do it via command line? Thanks for your help.
  8. i could upgrade and get it enabled if needed. I mean if there's no other simple way.
  9. Hi Basically I have a dump of an sql file for my site, from a previous hosting which has now expired. Got new hosting, need to import it. It's only 2MB, pretty small i guess, but I have a really shit connection, and so far have fail to upload it to phpmyadmin via my web browser. Any idea on the best way to upload it would be? I was thinking of splitting it, but how? Or any other ideas would be great. Thanks
  10. It's in this file. To make sure it wasn't facebook.php, I changed to bebo (they have a compatible api/libary) to test first. And also removed config.php and just put the variables in this file. set.php <? require_once 'bebo.php'; $BEBO_API="YQmEbXMjdYTW38y00000000000000000000t"; $BEBO_SECRET="1lpji7Bto0jZyB6h600000000000000000000"; $bebo = new Bebo($BEBO_API, $BEBO_SECRET); $props = array( 'canvas_url' => 'http://www.mysite.com/7/'); $bebo->api_client->admin_setAppProperties($props); ?> PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/mysite/public_html/set.php on line 6 Really going over my head tbh. =/ Any ideas?
  11. Hi Full file is <? require_once 'facebook.php'; require_once 'config.php'; $bebo = new Facebook($FACEBOOK_API, $FACEBOOK_SECRET); $props = array( 'canvas_url' => 'http://www.site.com/someurl/'); $facebook->api_client->admin_setAppProperties($props); ?>
  12. Still nothing. Maybe my problem lies elsewhere? PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on that line. Might be due to my version/set of php or whatever? (although i am using php 5) Thanks
×
×
  • 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.