Jump to content

alexpja

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

alexpja's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Or: $hiliFront = '<strong style="background: yellow;"><em>'; $hiliBack='</em></strong>'; echo "Welcome ".$hiliFront."Kicken".$hiliBack.", how are you today";
  2. I would recommend doing what you suggested, except having a username column so it can *somehow* verify it's that user, unless the token will verify it. That should work, good luck
  3. Will try to do the first method but for now I'm sticking with the first one... thanks!
  4. "Then just build a case to use the appropriate one." ~ ? "You can't really combine them all together, since they're different APIs." ~ That's not what I meant, I meant like put them all in the same script not like combine them all... sorry for the weird wording... used to typing in Polish :S
  5. I'd do that if I knew HOW to... could you explain it even further with some code??
  6. I can do the form, except I do not now how I would switch over the result and call the function when I have 4 diff. APIs and I need them all in one script... should I just put all of them together in the script?
  7. Yes, I'd like to know how can I combine all of the API codes I have into one script so the user can shorten their link.
  8. Hi there I am making a PHP url shortener using about 4-5 APIs from different websites (to.ly, sn.im, goo.gl, is.dg) and I need to combine them into one PHP script... and also the form lets the user pick which url shortener they want. to.ly: <?php function CompressURL($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://to.ly/api.php?longurl=".urlencode($url)); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HEADER, 0); $shorturl = curl_exec ($ch); curl_close ($ch); return $shorturl; } echo CompressURL($_POST[url]); // Test ?> sn.im: <?php // REQUIRED FIELDS $sniplink = $_POST[url]; // THE URL TO BE SNIPPED $snipuser = 'alexpja'; // YOUR USER ID REQUIRED $snipapi = ''; // FIND IN YOUR "SETTINGS" PAGE // OPTIONAL FIELDS $snipnick = ''; // MEANINGFUL NICKNAME FOR SNIPURL $sniptitle = ''; // TITLE IF ANY $snippk = ''; // PRIVATE KEY IF ANY $snipowner = ''; // IF THE SNIP OWNER IS SOMEONE ELSE $snipformat = 'simple'; // DEFAULT RESPONSE IS IN XML, SEND "simple" // FOR JUST THE SNIPURL $snipformat_includepk = ""; // SET TO "Y" IF YOU WANT THE PRIVATE KEY // RETURNED IN THE SNIPURL ALONG WITH THE ALIAS //---------------------------------- // NO NEED TO EDIT BEYOND THIS POINT //---------------------------------- $URL = 'http://snipr.com/site/getsnip'; $sniplink = rawurlencode($sniplink); $snipnick = rawurlencode($snipnick); $sniptitle = rawurlencode($sniptitle); // POSTFIELD $postfield = 'sniplink=' . $sniplink . '&' . 'snipnick=' . $snipnick . '&' . 'snipuser=' . $snipuser . '&' . 'snipapi=' . $snipapi . '&' . 'sniptitle=' . $sniptitle . '&' . 'snipowner=' . $snipowner . '&' . 'snipformat='. $snipformat. '&' . 'snippk=' . $snippk ; $ch = curl_init($URL); curl_setopt($ch, CURLOPT_URL, $URL); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfield); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); // THIS IS MERELY FOR DISPLAY IN A BROWSER // TO GET THE RESPONSE DATA, JUST USE $data // echo '<pre>', htmlentities($data), '</pre>'; echo $data; ?> Help?? and should I name the <option> like... <option name="is.dg">?
  9. Hi. I am working on a social network called Leaflet and there is this red box called User's Branches. There, are supposed to be lines of the file where the branches (tweets) are stored. They then appear on the user's tree (wall). I need it to be that it reads line 1 for the first line on the tree. Line 2, line 3, etc. Please help. Alex
×
×
  • 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.